diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-05-21 10:07:58 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-05-21 10:07:58 +0000 |
commit | 7fb5550c4dd74db2bc71ec188a645697416ebb11 (patch) | |
tree | 0804b9b14cda73d205e505079116199db7871855 /src/fs | |
parent | 5cc05fe11eba4926c5ec754f7d0ea596a3b87418 (diff) | |
download | gnunet-7fb5550c4dd74db2bc71ec188a645697416ebb11.tar.gz gnunet-7fb5550c4dd74db2bc71ec188a645697416ebb11.zip |
with respect to #3615: we might (theoretically) get a migration stop before we finished the peerstore lookup; in that case, we would do a GSF_push_start() twice (once via revive migration, and once from peerstore lookup succeeding), and then on disconnect only stop once, keeping the migration going for a disconnected peer. That still does not explain the bug report, as the '*cp' in the report doesn't show BADFOOD, and we'd expect a free'd cp in this case to be used for the transmission. Still, this is a possible issue which can be fixed by ignoring migration stop messages until after peerstore lookup succeeded
Diffstat (limited to 'src/fs')
-rw-r--r-- | src/fs/gnunet-service-fs_cp.c | 3 | ||||
-rw-r--r-- | src/fs/gnunet-service-fs_push.c | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/fs/gnunet-service-fs_cp.c b/src/fs/gnunet-service-fs_cp.c index 708308f7f..5dcd7689e 100644 --- a/src/fs/gnunet-service-fs_cp.c +++ b/src/fs/gnunet-service-fs_cp.c | |||
@@ -741,7 +741,8 @@ GSF_handle_p2p_migration_stop_ (void *cls, | |||
741 | GNUNET_i2s (other), | 741 | GNUNET_i2s (other), |
742 | GNUNET_STRINGS_relative_time_to_string (bt, GNUNET_YES)); | 742 | GNUNET_STRINGS_relative_time_to_string (bt, GNUNET_YES)); |
743 | cp->ppd.migration_blocked_until = GNUNET_TIME_relative_to_absolute (bt); | 743 | cp->ppd.migration_blocked_until = GNUNET_TIME_relative_to_absolute (bt); |
744 | if (NULL == cp->mig_revive_task) | 744 | if ( (NULL == cp->mig_revive_task) && |
745 | (NULL == cp->respect_iterate_req) ) | ||
745 | { | 746 | { |
746 | GSF_push_stop_ (cp); | 747 | GSF_push_stop_ (cp); |
747 | cp->mig_revive_task = | 748 | cp->mig_revive_task = |
diff --git a/src/fs/gnunet-service-fs_push.c b/src/fs/gnunet-service-fs_push.c index d1bdad1d5..73813c68e 100644 --- a/src/fs/gnunet-service-fs_push.c +++ b/src/fs/gnunet-service-fs_push.c | |||
@@ -611,6 +611,7 @@ GSF_push_start_ (struct GSF_ConnectedPeer *peer) | |||
611 | break; | 611 | break; |
612 | if (NULL != mrp) | 612 | if (NULL != mrp) |
613 | { | 613 | { |
614 | /* same peer added twice, must not happen */ | ||
614 | GNUNET_break (0); | 615 | GNUNET_break (0); |
615 | return; | 616 | return; |
616 | } | 617 | } |