gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r33416 - gnunet/src/transport
Date: Tue, 27 May 2014 12:56:24 +0200

Author: wachs
Date: 2014-05-27 12:56:24 +0200 (Tue, 27 May 2014)
New Revision: 33416

Modified:
   gnunet/src/transport/gnunet-transport.c
Log:
fix address resolution process


Modified: gnunet/src/transport/gnunet-transport.c
===================================================================
--- gnunet/src/transport/gnunet-transport.c     2014-05-27 10:04:25 UTC (rev 
33415)
+++ gnunet/src/transport/gnunet-transport.c     2014-05-27 10:56:24 UTC (rev 
33416)
@@ -1079,22 +1079,26 @@
 {
   struct PeerResolutionContext *rc = cls;
 
-  if (address != NULL )
+  if (GNUNET_SYSERR == res)
   {
-    if (GNUNET_SYSERR == res)
-    {
-      FPRINTF (stderr, "Failed to convert address for peer `%s' plugin `%s' 
length %lu to string \n",
-          GNUNET_i2s (&rc->id),
-          rc->addrcp->transport_name,
-          rc->addrcp->address_length);
-      print_info (&rc->id, rc->transport, NULL, rc->state, rc->state_timeout);
-    }
-    else
-      print_info (&rc->id, rc->transport, address, rc->state, 
rc->state_timeout);
+    FPRINTF (stderr, "Failed to convert address for peer `%s' plugin `%s' 
length %lu to string \n",
+        GNUNET_i2s (&rc->id),
+        rc->addrcp->transport_name,
+        rc->addrcp->address_length);
+    print_info (&rc->id, rc->transport, NULL, rc->state, rc->state_timeout);
     rc->printed = GNUNET_YES;
+    return;
   }
-  else
+
+  if ((GNUNET_OK == res) && (address != NULL))
   {
+    print_info (&rc->id, rc->transport, address, rc->state, rc->state_timeout);
+    rc->printed = GNUNET_YES;
+    return; /* Wait for done call */
+  }
+
+  if (NULL == address)
+  {
     /* done */
     GNUNET_assert(address_resolutions > 0);
     address_resolutions--;




reply via email to

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