}
/**
- * 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,
{
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,