diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-02-06 09:35:56 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-02-06 09:35:56 +0000 |
commit | 7e599b44d257d9d9c6100e4050dc1eb09c9e13d2 (patch) | |
tree | 6f63e09cf3a296d4daf6135077b58a9006e564e9 /src/transport/gnunet-service-transport.c | |
parent | dc0da555fd351b2a96bca0a6494e83f0643fac31 (diff) | |
download | gnunet-7e599b44d257d9d9c6100e4050dc1eb09c9e13d2.tar.gz gnunet-7e599b44d257d9d9c6100e4050dc1eb09c9e13d2.zip |
-applying patch from vminko to fix #1972: adding support for continuous transport-level connection monitoring
Diffstat (limited to 'src/transport/gnunet-service-transport.c')
-rw-r--r-- | src/transport/gnunet-service-transport.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index eec1684db..8b96babc3 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c | |||
@@ -494,6 +494,23 @@ neighbours_disconnect_notification (void *cls, | |||
494 | 494 | ||
495 | 495 | ||
496 | /** | 496 | /** |
497 | * Function called to notify transport users that a neighbour peer changed its | ||
498 | * active address. | ||
499 | * | ||
500 | * @param cls closure | ||
501 | * @param peer peer this update is about (never NULL) | ||
502 | * @param address address, NULL on disconnect | ||
503 | */ | ||
504 | static void | ||
505 | neighbours_address_notification (void *cls, | ||
506 | const struct GNUNET_PeerIdentity *peer, | ||
507 | const struct GNUNET_HELLO_Address *address) | ||
508 | { | ||
509 | GST_clients_broadcast_address_notification (peer, address); | ||
510 | } | ||
511 | |||
512 | |||
513 | /** | ||
497 | * Function called when the service shuts down. Unloads our plugins | 514 | * Function called when the service shuts down. Unloads our plugins |
498 | * and cancels pending validations. | 515 | * and cancels pending validations. |
499 | * | 516 | * |
@@ -589,8 +606,10 @@ run (void *cls, struct GNUNET_SERVER_Handle *server, | |||
589 | &plugin_env_address_change_notification, | 606 | &plugin_env_address_change_notification, |
590 | &plugin_env_session_end, | 607 | &plugin_env_session_end, |
591 | &plugin_env_address_to_type); | 608 | &plugin_env_address_to_type); |
592 | GST_neighbours_start (NULL, &neighbours_connect_notification, | 609 | GST_neighbours_start (NULL, |
593 | &neighbours_disconnect_notification); | 610 | &neighbours_connect_notification, |
611 | &neighbours_disconnect_notification, | ||
612 | &neighbours_address_notification); | ||
594 | GST_clients_start (server); | 613 | GST_clients_start (server); |
595 | GST_validation_start (); | 614 | GST_validation_start (); |
596 | } | 615 | } |