diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-12-08 22:31:04 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-12-08 22:31:04 +0000 |
commit | 438710f03600e93d9b7a9f5387ebb1d7e5a0bb16 (patch) | |
tree | daeefdae11822eb9d83d7aa84ca326fb9322b7c6 | |
parent | 06ab204142b7614583f85856b22bf0bbef8e92a9 (diff) | |
download | gnunet-438710f03600e93d9b7a9f5387ebb1d7e5a0bb16.tar.gz gnunet-438710f03600e93d9b7a9f5387ebb1d7e5a0bb16.zip |
-fix #3168, cancel retry task AFTER GMT_cancel, as that triggers a callback in gnunet-service-mesh-peer.c:952 which may then CREATE a new task
-rw-r--r-- | src/mesh/gnunet-service-mesh_channel.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mesh/gnunet-service-mesh_channel.c b/src/mesh/gnunet-service-mesh_channel.c index b6305aabe..ba9485fdc 100644 --- a/src/mesh/gnunet-service-mesh_channel.c +++ b/src/mesh/gnunet-service-mesh_channel.c | |||
@@ -918,12 +918,13 @@ channel_rel_free_all (struct MeshChannelReliability *rel) | |||
918 | LOG (GNUNET_ERROR_TYPE_DEBUG, " COPYFREE BATCH %p\n", copy); | 918 | LOG (GNUNET_ERROR_TYPE_DEBUG, " COPYFREE BATCH %p\n", copy); |
919 | GNUNET_free (copy); | 919 | GNUNET_free (copy); |
920 | } | 920 | } |
921 | if (NULL != rel->uniq && NULL != rel->uniq->q) | ||
922 | GMT_cancel (rel->uniq->q); | ||
921 | if (GNUNET_SCHEDULER_NO_TASK != rel->retry_task) | 923 | if (GNUNET_SCHEDULER_NO_TASK != rel->retry_task) |
922 | { | 924 | { |
923 | GNUNET_SCHEDULER_cancel (rel->retry_task); | 925 | GNUNET_SCHEDULER_cancel (rel->retry_task); |
926 | rel->retry_task = GNUNET_SCHEDULER_NO_TASK; | ||
924 | } | 927 | } |
925 | if (NULL != rel->uniq && NULL != rel->uniq->q) | ||
926 | GMT_cancel (rel->uniq->q); | ||
927 | GNUNET_free (rel); | 928 | GNUNET_free (rel); |
928 | } | 929 | } |
929 | 930 | ||
@@ -1965,6 +1966,7 @@ GMCH_handle_data_ack (struct MeshChannel *ch, | |||
1965 | if (GNUNET_SCHEDULER_NO_TASK != rel->retry_task) | 1966 | if (GNUNET_SCHEDULER_NO_TASK != rel->retry_task) |
1966 | { | 1967 | { |
1967 | GNUNET_SCHEDULER_cancel (rel->retry_task); | 1968 | GNUNET_SCHEDULER_cancel (rel->retry_task); |
1969 | rel->retry_task = GNUNET_SCHEDULER_NO_TASK; | ||
1968 | if (NULL != rel->head_sent && NULL == rel->head_sent->q) | 1970 | if (NULL != rel->head_sent && NULL == rel->head_sent->q) |
1969 | { | 1971 | { |
1970 | struct GNUNET_TIME_Absolute new_target; | 1972 | struct GNUNET_TIME_Absolute new_target; |
@@ -1980,10 +1982,6 @@ GMCH_handle_data_ack (struct MeshChannel *ch, | |||
1980 | &channel_retransmit_message, | 1982 | &channel_retransmit_message, |
1981 | rel); | 1983 | rel); |
1982 | } | 1984 | } |
1983 | else /* either no more traffic to ack or traffic has just been queued */ | ||
1984 | { | ||
1985 | rel->retry_task = GNUNET_SCHEDULER_NO_TASK; | ||
1986 | } | ||
1987 | } | 1985 | } |
1988 | else /* work was done but no task was pending? shouldn't happen! */ | 1986 | else /* work was done but no task was pending? shouldn't happen! */ |
1989 | { | 1987 | { |