gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r2214 - GNUnet/src/applications/transport


From: durner
Subject: [GNUnet-SVN] r2214 - GNUnet/src/applications/transport
Date: Wed, 26 Oct 2005 13:45:24 -0700 (PDT)

Author: durner
Date: 2005-10-26 13:45:21 -0700 (Wed, 26 Oct 2005)
New Revision: 2214

Modified:
   GNUnet/src/applications/transport/transport.c
Log:
Don't hang on startup if no network connection was established (Mantis #956)

Modified: GNUnet/src/applications/transport/transport.c
===================================================================
--- GNUnet/src/applications/transport/transport.c       2005-10-26 20:05:28 UTC 
(rev 2213)
+++ GNUnet/src/applications/transport/transport.c       2005-10-26 20:45:21 UTC 
(rev 2214)
@@ -597,8 +597,7 @@
   ctapi.receive = NULL;
 }
 
-static void initHelper(TransportAPI * tapi,
-                      void * unused) {
+static void initHello(TransportAPI * tapi) {
   P2P_hello_MESSAGE * helo;
 
   createSignedhello(tapi);
@@ -609,9 +608,24 @@
   }
 }
 
+static void initHelper(TransportAPI * tapi,
+                      void * unused) {
+  /* Creation of HELLOs takes longer if a locally
+     unresolvable hostname ((Dyn)DNS) was specified
+     as this host's address and we have no network
+     connection at the moment. gethostbyname()
+     blocks the startup process in this case.
+     This is why we create the HELLOs in another
+     thread. */
+  addCronJob((CronJob)&initHello,
+       0,
+       0,
+       tapi);
+}
 
 
 
+
 /**
  * Initialize the transport layer.
  */





reply via email to

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