gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r19717 - gnunet/src/transport
Date: Tue, 7 Feb 2012 11:23:54 +0100

Author: grothoff
Date: 2012-02-07 11:23:53 +0100 (Tue, 07 Feb 2012)
New Revision: 19717

Modified:
   gnunet/src/transport/gnunet-transport.c
Log:
-patch from #1972 to display disconnects instead of exiting

Modified: gnunet/src/transport/gnunet-transport.c
===================================================================
--- gnunet/src/transport/gnunet-transport.c     2012-02-06 21:49:41 UTC (rev 
19716)
+++ gnunet/src/transport/gnunet-transport.c     2012-02-07 10:23:53 UTC (rev 
19717)
@@ -460,13 +460,11 @@
 }
 
 /**
- * Function to call with a human-readable format of an address
+ * Function to call with a binary address
  *
  * @param cls closure
  * @param peer identity of the peer
- * @param transport name of the plugin
- * @param addr binary address
- * @param addrlen number of bytes in addr
+ * @param address binary address (NULL on disconnect)
  */
 static void
 process_address (void *cls, const struct GNUNET_PeerIdentity *peer,
@@ -474,12 +472,18 @@
 {
   const struct GNUNET_CONFIGURATION_Handle *cfg = cls;
 
-  if ((address == NULL) || (peer == NULL))
+  if (peer == NULL)
   {
     /* done */
     return;
   }
 
+  if (address == NULL)
+  {
+    FPRINTF (stdout, _("Peer `%s' disconnected\n"), GNUNET_i2s (peer));
+    return;
+  }
+
   /* Resolve address to string */
   GNUNET_TRANSPORT_address_to_string (cfg, address, numeric,
                                       GNUNET_TIME_UNIT_MINUTES, 
&process_string,




reply via email to

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