diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-03-17 09:12:22 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-03-17 09:12:22 +0000 |
commit | 185c64be9e8bde2d934fcc239cceb23e3c405f49 (patch) | |
tree | 2e93ed6b7356f3312697ba099860295a746a1e88 /src/transport/plugin_transport_udp.c | |
parent | 15979c403a13e38d0e8f81aae34eaaf2a0504838 (diff) | |
download | gnunet-185c64be9e8bde2d934fcc239cceb23e3c405f49.tar.gz gnunet-185c64be9e8bde2d934fcc239cceb23e3c405f49.zip |
consistently call deq before qc
Diffstat (limited to 'src/transport/plugin_transport_udp.c')
-rw-r--r-- | src/transport/plugin_transport_udp.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index 4eb4b7f36..4fef8e0c6 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c | |||
@@ -2986,13 +2986,12 @@ remove_timeout_messages_and_select (struct Plugin *plugin, | |||
2986 | if (GNUNET_TIME_UNIT_ZERO.rel_value_us == remaining.rel_value_us) | 2986 | if (GNUNET_TIME_UNIT_ZERO.rel_value_us == remaining.rel_value_us) |
2987 | { | 2987 | { |
2988 | /* Message timed out */ | 2988 | /* Message timed out */ |
2989 | udpw->qc (udpw->qc_cls, | ||
2990 | udpw, | ||
2991 | GNUNET_SYSERR); | ||
2992 | /* Remove message */ | ||
2993 | removed = GNUNET_YES; | 2989 | removed = GNUNET_YES; |
2994 | dequeue (plugin, | 2990 | dequeue (plugin, |
2995 | udpw); | 2991 | udpw); |
2992 | udpw->qc (udpw->qc_cls, | ||
2993 | udpw, | ||
2994 | GNUNET_SYSERR); | ||
2996 | GNUNET_free (udpw); | 2995 | GNUNET_free (udpw); |
2997 | 2996 | ||
2998 | if (sock == plugin->sockv4) | 2997 | if (sock == plugin->sockv4) |
@@ -3166,11 +3165,11 @@ udp_select_send (struct Plugin *plugin, | |||
3166 | else | 3165 | else |
3167 | { | 3166 | { |
3168 | GNUNET_break (0); | 3167 | GNUNET_break (0); |
3168 | dequeue (plugin, | ||
3169 | udpw); | ||
3169 | udpw->qc (udpw->qc_cls, | 3170 | udpw->qc (udpw->qc_cls, |
3170 | udpw, | 3171 | udpw, |
3171 | GNUNET_SYSERR); | 3172 | GNUNET_SYSERR); |
3172 | dequeue (plugin, | ||
3173 | udpw); | ||
3174 | notify_session_monitor (plugin, | 3173 | notify_session_monitor (plugin, |
3175 | udpw->session, | 3174 | udpw->session, |
3176 | GNUNET_TRANSPORT_SS_UPDATE); | 3175 | GNUNET_TRANSPORT_SS_UPDATE); |
@@ -3182,6 +3181,8 @@ udp_select_send (struct Plugin *plugin, | |||
3182 | udpw->msg_size, | 3181 | udpw->msg_size, |
3183 | a, | 3182 | a, |
3184 | slen); | 3183 | slen); |
3184 | dequeue (plugin, | ||
3185 | udpw); | ||
3185 | if (GNUNET_SYSERR == sent) | 3186 | if (GNUNET_SYSERR == sent) |
3186 | { | 3187 | { |
3187 | /* Failure */ | 3188 | /* Failure */ |
@@ -3226,8 +3227,6 @@ udp_select_send (struct Plugin *plugin, | |||
3226 | udpw, | 3227 | udpw, |
3227 | GNUNET_OK); | 3228 | GNUNET_OK); |
3228 | } | 3229 | } |
3229 | dequeue (plugin, | ||
3230 | udpw); | ||
3231 | notify_session_monitor (plugin, | 3230 | notify_session_monitor (plugin, |
3232 | udpw->session, | 3231 | udpw->session, |
3233 | GNUNET_TRANSPORT_SS_UPDATE); | 3232 | GNUNET_TRANSPORT_SS_UPDATE); |