gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r17246 - gnunet/src/transport


From: gnunet
Subject: [GNUnet-SVN] r17246 - gnunet/src/transport
Date: Thu, 6 Oct 2011 13:33:09 +0200

Author: wachs
Date: 2011-10-06 13:33:09 +0200 (Thu, 06 Oct 2011)
New Revision: 17246

Modified:
   gnunet/src/transport/plugin_transport_http_server.c
Log:
error handling if server could not be started


Modified: gnunet/src/transport/plugin_transport_http_server.c
===================================================================
--- gnunet/src/transport/plugin_transport_http_server.c 2011-10-06 11:19:44 UTC 
(rev 17245)
+++ gnunet/src/transport/plugin_transport_http_server.c 2011-10-06 11:33:09 UTC 
(rev 17246)
@@ -996,8 +996,6 @@
                                            &server_disconnect_cb, plugin,
                                            MHD_OPTION_EXTERNAL_LOGGER,
                                            server_log, NULL, MHD_OPTION_END);
-    if (plugin->server_v4 == NULL)
-      res = GNUNET_SYSERR;
   }
   plugin->server_v6 = NULL;
   if (plugin->ipv6 == GNUNET_YES)
@@ -1036,10 +1034,23 @@
                                            MHD_OPTION_EXTERNAL_LOGGER,
                                            server_log, NULL, MHD_OPTION_END);
 
-    if (plugin->server_v6 == NULL)
-      res = GNUNET_SYSERR;
   }
 
+  if ((plugin->ipv4 == GNUNET_YES) && (plugin->server_v4 == NULL))
+  {
+    GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name,
+                     "Failed to start %s IPv4 server component on port %u\n", 
plugin->name,
+                     plugin->port);
+    return GNUNET_SYSERR;
+  }
+  if ((plugin->ipv6 == GNUNET_YES) && (plugin->server_v6 == NULL))
+  {
+    GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name,
+                     "Failed to start %s IPv6 server component on port %u\n", 
plugin->name,
+                     plugin->port);
+    return GNUNET_SYSERR;
+  }
+
   server_reschedule (plugin, GNUNET_NO);
 
 #if DEBUG_HTTP




reply via email to

[Prev in Thread] Current Thread [Next in Thread]