diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2014-08-20 14:24:48 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2014-08-20 14:24:48 +0000 |
commit | 524e0f6a8fed38587b15bda40c709ee7dcbd18cd (patch) | |
tree | 16cd67e36eb3047e1c55d1ae80a697be7305d907 | |
parent | a1782d0f729d8396b55d061ddac27398b4237467 (diff) | |
download | gnunet-524e0f6a8fed38587b15bda40c709ee7dcbd18cd.tar.gz gnunet-524e0f6a8fed38587b15bda40c709ee7dcbd18cd.zip |
Change the mode in DHT disconnect handler.
-rw-r--r-- | src/dht/gnunet_dht_profiler.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/dht/gnunet_dht_profiler.c b/src/dht/gnunet_dht_profiler.c index 2eb95d6f4..b4867cd7c 100644 --- a/src/dht/gnunet_dht_profiler.c +++ b/src/dht/gnunet_dht_profiler.c | |||
@@ -638,12 +638,7 @@ put_cont (void *cls, int success) | |||
638 | n_puts_fail++; | 638 | n_puts_fail++; |
639 | GNUNET_assert (NULL != ctx); | 639 | GNUNET_assert (NULL != ctx); |
640 | GNUNET_TESTBED_operation_done (ctx->op); | 640 | GNUNET_TESTBED_operation_done (ctx->op); |
641 | /* Start GETs if all PUTs have been made */ | 641 | ctx->op = NULL; |
642 | if (n_active == n_puts_ok + n_puts_fail) | ||
643 | { | ||
644 | mode = MODE_GET; | ||
645 | start_profiling (); | ||
646 | } | ||
647 | } | 642 | } |
648 | 643 | ||
649 | 644 | ||
@@ -755,8 +750,16 @@ dht_disconnect (void *cls, void *op_result) | |||
755 | GNUNET_assert (ac->dht == op_result); | 750 | GNUNET_assert (ac->dht == op_result); |
756 | GNUNET_DHT_disconnect (ac->dht); | 751 | GNUNET_DHT_disconnect (ac->dht); |
757 | n_dht--; | 752 | n_dht--; |
758 | if (0 == n_dht) | 753 | if (0 != n_dht) |
759 | GNUNET_SCHEDULER_shutdown (); | 754 | return; |
755 | /* Start GETs if all PUTs have been made */ | ||
756 | if (MODE_PUT == mode) | ||
757 | { | ||
758 | mode = MODE_GET; | ||
759 | start_profiling (); | ||
760 | return; | ||
761 | } | ||
762 | GNUNET_SCHEDULER_shutdown (); | ||
760 | } | 763 | } |
761 | 764 | ||
762 | 765 | ||