aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_http_server.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2011-10-06 11:33:09 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2011-10-06 11:33:09 +0000
commit9778817e667bc13d4add8f4779b39b6f6a607bfb (patch)
treeb95361d47adfbd1634bd93bf4e4f6094f84ecfad /src/transport/plugin_transport_http_server.c
parent1dca76f0cd630fbe37d0b0ed7ee193ddaa6c730e (diff)
downloadgnunet-9778817e667bc13d4add8f4779b39b6f6a607bfb.tar.gz
gnunet-9778817e667bc13d4add8f4779b39b6f6a607bfb.zip
error handling if server could not be started
Diffstat (limited to 'src/transport/plugin_transport_http_server.c')
-rw-r--r--src/transport/plugin_transport_http_server.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c
index 328c14c77..2ec5964ca 100644
--- a/src/transport/plugin_transport_http_server.c
+++ b/src/transport/plugin_transport_http_server.c
@@ -996,8 +996,6 @@ server_start (struct Plugin *plugin)
996 &server_disconnect_cb, plugin, 996 &server_disconnect_cb, plugin,
997 MHD_OPTION_EXTERNAL_LOGGER, 997 MHD_OPTION_EXTERNAL_LOGGER,
998 server_log, NULL, MHD_OPTION_END); 998 server_log, NULL, MHD_OPTION_END);
999 if (plugin->server_v4 == NULL)
1000 res = GNUNET_SYSERR;
1001 } 999 }
1002 plugin->server_v6 = NULL; 1000 plugin->server_v6 = NULL;
1003 if (plugin->ipv6 == GNUNET_YES) 1001 if (plugin->ipv6 == GNUNET_YES)
@@ -1036,8 +1034,21 @@ server_start (struct Plugin *plugin)
1036 MHD_OPTION_EXTERNAL_LOGGER, 1034 MHD_OPTION_EXTERNAL_LOGGER,
1037 server_log, NULL, MHD_OPTION_END); 1035 server_log, NULL, MHD_OPTION_END);
1038 1036
1039 if (plugin->server_v6 == NULL) 1037 }
1040 res = GNUNET_SYSERR; 1038
1039 if ((plugin->ipv4 == GNUNET_YES) && (plugin->server_v4 == NULL))
1040 {
1041 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name,
1042 "Failed to start %s IPv4 server component on port %u\n", plugin->name,
1043 plugin->port);
1044 return GNUNET_SYSERR;
1045 }
1046 if ((plugin->ipv6 == GNUNET_YES) && (plugin->server_v6 == NULL))
1047 {
1048 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name,
1049 "Failed to start %s IPv6 server component on port %u\n", plugin->name,
1050 plugin->port);
1051 return GNUNET_SYSERR;
1041 } 1052 }
1042 1053
1043 server_reschedule (plugin, GNUNET_NO); 1054 server_reschedule (plugin, GNUNET_NO);