diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-01-24 20:23:06 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-01-24 20:23:06 +0000 |
commit | 6c76bdb2f02ad3b57a1e7381c26b30fd03ae0095 (patch) | |
tree | ef096b720daf80d88453b1ec0b804bd0dfd3c663 /src/exit/gnunet-daemon-exit.c | |
parent | 514980f9db73cc0bbcb310b7161a49f5b94f1e69 (diff) | |
download | gnunet-6c76bdb2f02ad3b57a1e7381c26b30fd03ae0095.tar.gz gnunet-6c76bdb2f02ad3b57a1e7381c26b30fd03ae0095.zip |
-handle mesh errors more gracefully
Diffstat (limited to 'src/exit/gnunet-daemon-exit.c')
-rw-r--r-- | src/exit/gnunet-daemon-exit.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/exit/gnunet-daemon-exit.c b/src/exit/gnunet-daemon-exit.c index 514554b80..9e37c0696 100644 --- a/src/exit/gnunet-daemon-exit.c +++ b/src/exit/gnunet-daemon-exit.c | |||
@@ -523,6 +523,20 @@ send_to_peer_notify_callback (void *cls, size_t size, void *buf) | |||
523 | 523 | ||
524 | s->th = NULL; | 524 | s->th = NULL; |
525 | tnq = s->head; | 525 | tnq = s->head; |
526 | if (NULL == tnq) | ||
527 | return 0; | ||
528 | if (0 == size) | ||
529 | { | ||
530 | s->th = GNUNET_MESH_notify_transmit_ready (tunnel, | ||
531 | GNUNET_NO /* corking */, | ||
532 | 0 /* priority */, | ||
533 | GNUNET_TIME_UNIT_FOREVER_REL, | ||
534 | NULL, | ||
535 | tnq->len, | ||
536 | &send_to_peer_notify_callback, | ||
537 | s); | ||
538 | return 0; | ||
539 | } | ||
526 | GNUNET_assert (size >= tnq->len); | 540 | GNUNET_assert (size >= tnq->len); |
527 | memcpy (buf, tnq->payload, tnq->len); | 541 | memcpy (buf, tnq->payload, tnq->len); |
528 | size = tnq->len; | 542 | size = tnq->len; |