diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-03-07 10:33:47 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-03-07 10:33:47 +0000 |
commit | b80ca38067a55ae8588446ad47ecc7af65abefcc (patch) | |
tree | f58e674917026c236441584d2d4bed123edcbdc6 /src/transport/gnunet-service-transport_neighbours.c | |
parent | 1aebcd292bfe9863fe1609ed6c055e4db83cce9f (diff) | |
download | gnunet-b80ca38067a55ae8588446ad47ecc7af65abefcc.tar.gz gnunet-b80ca38067a55ae8588446ad47ecc7af65abefcc.zip |
trying to fix #3702 by removing session from session map earlier -- and adding additional check for messages being enqueued for destroyed sessions
Diffstat (limited to 'src/transport/gnunet-service-transport_neighbours.c')
-rw-r--r-- | src/transport/gnunet-service-transport_neighbours.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c index 9ce06d1b5..403eba3f6 100644 --- a/src/transport/gnunet-service-transport_neighbours.c +++ b/src/transport/gnunet-service-transport_neighbours.c | |||
@@ -1282,7 +1282,8 @@ transmit_send_continuation (void *cls, | |||
1282 | n->is_active = NULL; | 1282 | n->is_active = NULL; |
1283 | if (NULL != n->task) | 1283 | if (NULL != n->task) |
1284 | GNUNET_SCHEDULER_cancel (n->task); | 1284 | GNUNET_SCHEDULER_cancel (n->task); |
1285 | n->task = GNUNET_SCHEDULER_add_now (&master_task, n); | 1285 | n->task = GNUNET_SCHEDULER_add_now (&master_task, |
1286 | n); | ||
1286 | } | 1287 | } |
1287 | if (bytes_in_send_queue < mq->message_buf_size) | 1288 | if (bytes_in_send_queue < mq->message_buf_size) |
1288 | { | 1289 | { |
@@ -1299,14 +1300,14 @@ transmit_send_continuation (void *cls, | |||
1299 | GNUNET_break (size_payload == mq->message_buf_size); | 1300 | GNUNET_break (size_payload == mq->message_buf_size); |
1300 | bytes_in_send_queue -= mq->message_buf_size; | 1301 | bytes_in_send_queue -= mq->message_buf_size; |
1301 | GNUNET_STATISTICS_set (GST_stats, | 1302 | GNUNET_STATISTICS_set (GST_stats, |
1302 | gettext_noop | 1303 | gettext_noop ("# bytes in message queue for other peers"), |
1303 | ("# bytes in message queue for other peers"), | 1304 | bytes_in_send_queue, |
1304 | bytes_in_send_queue, GNUNET_NO); | 1305 | GNUNET_NO); |
1305 | if (GNUNET_OK == success) | 1306 | if (GNUNET_OK == success) |
1306 | GNUNET_STATISTICS_update (GST_stats, | 1307 | GNUNET_STATISTICS_update (GST_stats, |
1307 | gettext_noop | 1308 | gettext_noop ("# messages transmitted to other peers"), |
1308 | ("# messages transmitted to other peers"), | 1309 | 1, |
1309 | 1, GNUNET_NO); | 1310 | GNUNET_NO); |
1310 | else | 1311 | else |
1311 | GNUNET_STATISTICS_update (GST_stats, | 1312 | GNUNET_STATISTICS_update (GST_stats, |
1312 | gettext_noop | 1313 | gettext_noop |
@@ -1319,7 +1320,10 @@ transmit_send_continuation (void *cls, | |||
1319 | mq->message_buf_size, | 1320 | mq->message_buf_size, |
1320 | (success == GNUNET_OK) ? "success" : "FAILURE"); | 1321 | (success == GNUNET_OK) ? "success" : "FAILURE"); |
1321 | if (NULL != mq->cont) | 1322 | if (NULL != mq->cont) |
1322 | mq->cont (mq->cont_cls, success, size_payload, physical); | 1323 | mq->cont (mq->cont_cls, |
1324 | success, | ||
1325 | size_payload, | ||
1326 | physical); | ||
1323 | GNUNET_free (mq); | 1327 | GNUNET_free (mq); |
1324 | } | 1328 | } |
1325 | 1329 | ||