diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-10-07 08:25:40 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-10-07 08:25:40 +0000 |
commit | 69823c5446ae906ef0b0328daa5d4514cd525f82 (patch) | |
tree | cd00d967c5039ae41120f931aab2ab700fd58f44 /src/transport/transport_api.c | |
parent | 503c615cff298a83a09751bb57dc7da5251ff742 (diff) | |
download | gnunet-69823c5446ae906ef0b0328daa5d4514cd525f82.tar.gz gnunet-69823c5446ae906ef0b0328daa5d4514cd525f82.zip |
major bugfix: is_ready must only be set to GNUNET_NO if we actually did transmit something to transport, otherwise we cannot expect to get a SEND_OK back
Diffstat (limited to 'src/transport/transport_api.c')
-rw-r--r-- | src/transport/transport_api.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/transport/transport_api.c b/src/transport/transport_api.c index 9d221c69e..5d34beeac 100644 --- a/src/transport/transport_api.c +++ b/src/transport/transport_api.c | |||
@@ -1018,7 +1018,6 @@ transport_notify_ready (void *cls, | |||
1018 | GNUNET_assert (n == GNUNET_CONTAINER_heap_remove_root (h->ready_heap)); | 1018 | GNUNET_assert (n == GNUNET_CONTAINER_heap_remove_root (h->ready_heap)); |
1019 | n->hn = NULL; | 1019 | n->hn = NULL; |
1020 | n->th = NULL; | 1020 | n->th = NULL; |
1021 | n->is_ready = GNUNET_NO; // FIXME! move into 'if' below! | ||
1022 | GNUNET_assert (size >= sizeof (struct OutboundMessage)); | 1021 | GNUNET_assert (size >= sizeof (struct OutboundMessage)); |
1023 | mret = | 1022 | mret = |
1024 | th->notify (th->notify_cls, size - sizeof (struct OutboundMessage), | 1023 | th->notify (th->notify_cls, size - sizeof (struct OutboundMessage), |
@@ -1032,6 +1031,7 @@ transport_notify_ready (void *cls, | |||
1032 | &do_warn_unready, | 1031 | &do_warn_unready, |
1033 | n); | 1032 | n); |
1034 | n->last_payload = GNUNET_TIME_absolute_get (); | 1033 | n->last_payload = GNUNET_TIME_absolute_get (); |
1034 | n->is_ready = GNUNET_NO; | ||
1035 | GNUNET_assert (mret + sizeof (struct OutboundMessage) < | 1035 | GNUNET_assert (mret + sizeof (struct OutboundMessage) < |
1036 | GNUNET_SERVER_MAX_MESSAGE_SIZE); | 1036 | GNUNET_SERVER_MAX_MESSAGE_SIZE); |
1037 | obm.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SEND); | 1037 | obm.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SEND); |