diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2014-05-21 08:02:38 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2014-05-21 08:02:38 +0000 |
commit | cb8d8079b402d69f1fa92ccdb5242e117493e174 (patch) | |
tree | a9786560574bf0fd9e6cec9b0448dff14868f01b /src/ats/ats_api_performance.c | |
parent | 3a33753786eca144a1dd2c3c4884b78774f29e3b (diff) | |
download | gnunet-cb8d8079b402d69f1fa92ccdb5242e117493e174.tar.gz gnunet-cb8d8079b402d69f1fa92ccdb5242e117493e174.zip |
performance API indicates disconnect
Diffstat (limited to 'src/ats/ats_api_performance.c')
-rw-r--r-- | src/ats/ats_api_performance.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/ats/ats_api_performance.c b/src/ats/ats_api_performance.c index a1d8dc21a..35dcc558f 100644 --- a/src/ats/ats_api_performance.c +++ b/src/ats/ats_api_performance.c | |||
@@ -587,6 +587,7 @@ process_ats_message (void *cls, const struct GNUNET_MessageHeader *msg) | |||
587 | GNUNET_CLIENT_receive (ph->client, &process_ats_message, ph, | 587 | GNUNET_CLIENT_receive (ph->client, &process_ats_message, ph, |
588 | GNUNET_TIME_UNIT_FOREVER_REL); | 588 | GNUNET_TIME_UNIT_FOREVER_REL); |
589 | return; | 589 | return; |
590 | |||
590 | reconnect: | 591 | reconnect: |
591 | if (NULL != ph->th) | 592 | if (NULL != ph->th) |
592 | { | 593 | { |
@@ -595,7 +596,14 @@ process_ats_message (void *cls, const struct GNUNET_MessageHeader *msg) | |||
595 | } | 596 | } |
596 | GNUNET_CLIENT_disconnect (ph->client); | 597 | GNUNET_CLIENT_disconnect (ph->client); |
597 | ph->client = NULL; | 598 | ph->client = NULL; |
598 | /* FIXME: need to signal monitor that we were disconnected! */ | 599 | if (NULL != ph->addr_info_cb) |
600 | { | ||
601 | /* Indicate reconnect */ | ||
602 | ph->addr_info_cb (ph->addr_info_cb_cls, NULL, GNUNET_NO, | ||
603 | GNUNET_BANDWIDTH_value_init (0), | ||
604 | GNUNET_BANDWIDTH_value_init(0), | ||
605 | NULL, 0); | ||
606 | } | ||
599 | ph->task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, | 607 | ph->task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, |
600 | &reconnect_task, ph); | 608 | &reconnect_task, ph); |
601 | } | 609 | } |