aboutsummaryrefslogtreecommitdiff
path: root/src/transport/gnunet-transport.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2011-12-22 14:15:31 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2011-12-22 14:15:31 +0000
commit93e31ff7e29d8a569b81e81133407c61ec1c839c (patch)
tree52ac55e5afa6320fa3d400c6e08247dc6c2bb4b6 /src/transport/gnunet-transport.c
parent49c4c6aea3a3c00fa8a7649e2abbc82a579d10a9 (diff)
downloadgnunet-93e31ff7e29d8a569b81e81133407c61ec1c839c.tar.gz
gnunet-93e31ff7e29d8a569b81e81133407c61ec1c839c.zip
include plugin in gnunet-transport output
Diffstat (limited to 'src/transport/gnunet-transport.c')
-rw-r--r--src/transport/gnunet-transport.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/transport/gnunet-transport.c b/src/transport/gnunet-transport.c
index c069bfb24..02a5ee492 100644
--- a/src/transport/gnunet-transport.c
+++ b/src/transport/gnunet-transport.c
@@ -440,16 +440,16 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
440void 440void
441process_string (void *cls, const char *address) 441process_string (void *cls, const char *address)
442{ 442{
443 struct GNUNET_PeerIdentity *peer = cls; 443 struct GNUNET_HELLO_Address *addrcp = cls;
444 444
445 if ((address != NULL)) 445 if ((address != NULL))
446 { 446 {
447 fprintf (stdout, _("Peer `%s': %s\n"), GNUNET_i2s (peer), address); 447 fprintf (stdout, _("Peer `%s': %s %s\n"), GNUNET_i2s (&addrcp->peer), addrcp->transport_name, address);
448 } 448 }
449 else 449 else
450 { 450 {
451 /* done */ 451 /* done */
452 GNUNET_free (peer); 452 GNUNET_free (addrcp);
453 } 453 }
454} 454}
455 455
@@ -467,7 +467,6 @@ process_address (void *cls, const struct GNUNET_PeerIdentity *peer,
467 const struct GNUNET_HELLO_Address *address) 467 const struct GNUNET_HELLO_Address *address)
468{ 468{
469 const struct GNUNET_CONFIGURATION_Handle *cfg = cls; 469 const struct GNUNET_CONFIGURATION_Handle *cfg = cls;
470 struct GNUNET_PeerIdentity *peercp;
471 470
472 if ((address == NULL) || (peer == NULL)) 471 if ((address == NULL) || (peer == NULL))
473 { 472 {
@@ -475,13 +474,10 @@ process_address (void *cls, const struct GNUNET_PeerIdentity *peer,
475 return; 474 return;
476 } 475 }
477 476
478 peercp = GNUNET_malloc (sizeof (struct GNUNET_PeerIdentity));
479 *peercp = *peer;
480
481 /* Resolve address to string */ 477 /* Resolve address to string */
482 GNUNET_TRANSPORT_address_to_string (cfg, address, numeric, 478 GNUNET_TRANSPORT_address_to_string (cfg, address, numeric,
483 GNUNET_TIME_UNIT_MINUTES, &process_string, 479 GNUNET_TIME_UNIT_MINUTES, &process_string,
484 peercp); 480 GNUNET_HELLO_address_copy(address));
485} 481}
486 482
487 483