diff options
author | Bruno Cabral <bcabral@uw.edu> | 2014-08-31 14:58:43 +0000 |
---|---|---|
committer | Bruno Cabral <bcabral@uw.edu> | 2014-08-31 14:58:43 +0000 |
commit | 937abe2f277d163e19b626fc37955d91e5126140 (patch) | |
tree | fba7ca533d8cd828e9064ebb9927e0184aa26e0a /src/fs/gnunet-service-fs_cadet_client.c | |
parent | 940c02e4903e957db965991c58be73e3400e31b0 (diff) | |
download | gnunet-937abe2f277d163e19b626fc37955d91e5126140.tar.gz gnunet-937abe2f277d163e19b626fc37955d91e5126140.zip |
Fix infinite loop ( grothoff, please check !)
Diffstat (limited to 'src/fs/gnunet-service-fs_cadet_client.c')
-rw-r--r-- | src/fs/gnunet-service-fs_cadet_client.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/fs/gnunet-service-fs_cadet_client.c b/src/fs/gnunet-service-fs_cadet_client.c index dde7aba48..aa2c0c426 100644 --- a/src/fs/gnunet-service-fs_cadet_client.c +++ b/src/fs/gnunet-service-fs_cadet_client.c | |||
@@ -219,8 +219,17 @@ reset_cadet (struct CadetHandle *mh) | |||
219 | "Resetting cadet channel to %s\n", | 219 | "Resetting cadet channel to %s\n", |
220 | GNUNET_i2s (&mh->target)); | 220 | GNUNET_i2s (&mh->target)); |
221 | mh->channel = NULL; | 221 | mh->channel = NULL; |
222 | |||
222 | if (NULL != channel) | 223 | if (NULL != channel) |
224 | { | ||
225 | /* Avoid loop */ | ||
226 | if ( NULL != mh->wh) | ||
227 | { | ||
228 | GNUNET_CADET_cancel_notify(mh->wh); | ||
229 | mh->wh = NULL; | ||
230 | } | ||
223 | GNUNET_CADET_channel_destroy (channel); | 231 | GNUNET_CADET_channel_destroy (channel); |
232 | } | ||
224 | GNUNET_CONTAINER_multihashmap_iterate (mh->waiting_map, | 233 | GNUNET_CONTAINER_multihashmap_iterate (mh->waiting_map, |
225 | &move_to_pending, | 234 | &move_to_pending, |
226 | mh); | 235 | mh); |