[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 13/14: avoid asserting in API on timeout destructi
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 13/14: avoid asserting in API on timeout destruction |
Date: |
Mon, 23 Jan 2017 14:42:53 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
commit 098777821b554cacdfcdfc6b36e3708d6391bd9a
Author: Christian Grothoff <address@hidden>
AuthorDate: Mon Jan 23 14:41:52 2017 +0100
avoid asserting in API on timeout destruction
---
src/cadet/test_cadet_single.c | 24 ++++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/src/cadet/test_cadet_single.c b/src/cadet/test_cadet_single.c
index d9aa1a214..a2716127d 100644
--- a/src/cadet/test_cadet_single.c
+++ b/src/cadet/test_cadet_single.c
@@ -49,6 +49,8 @@ static struct GNUNET_SCHEDULER_Task *connect_task;
static unsigned int repetition;
+static struct GNUNET_CADET_TransmitHandle *nth;
+
/* forward declaration */
static size_t
@@ -62,6 +64,11 @@ static void
do_shutdown (void *cls)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "shutdown\n");
+ if (NULL != nth)
+ {
+ GNUNET_CADET_notify_transmit_ready_cancel (nth);
+ nth = NULL;
+ }
if (NULL != abort_task)
{
GNUNET_SCHEDULER_cancel (abort_task);
@@ -131,11 +138,11 @@ data_callback (void *cls, struct GNUNET_CADET_Channel
*channel,
my_channel = ch1;
else
my_channel = ch2;
- GNUNET_CADET_notify_transmit_ready (my_channel, GNUNET_NO,
- GNUNET_TIME_UNIT_FOREVER_REL,
- sizeof (struct GNUNET_MessageHeader)
- + DATA_SIZE,
- &do_send, NULL);
+ nth = GNUNET_CADET_notify_transmit_ready (my_channel, GNUNET_NO,
+ GNUNET_TIME_UNIT_FOREVER_REL,
+ sizeof (struct
GNUNET_MessageHeader)
+ + DATA_SIZE,
+ &do_send, NULL);
GNUNET_CADET_receive_done (channel);
return GNUNET_OK;
}
@@ -228,6 +235,7 @@ do_send (void *cls, size_t size, void *buf)
{
struct GNUNET_MessageHeader *m = buf;
+ nth = NULL;
if (NULL == buf)
{
GNUNET_break (0);
@@ -257,9 +265,9 @@ do_connect (void *cls)
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "CONNECT BY PORT\n");
ch1 = GNUNET_CADET_channel_create (cadet, NULL, &id, GC_u2h (1),
GNUNET_CADET_OPTION_DEFAULT);
- GNUNET_CADET_notify_transmit_ready (ch1, GNUNET_NO,
- GNUNET_TIME_UNIT_FOREVER_REL,
- size, &do_send, NULL);
+ nth = GNUNET_CADET_notify_transmit_ready (ch1, GNUNET_NO,
+ GNUNET_TIME_UNIT_FOREVER_REL,
+ size, &do_send, NULL);
}
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnunet] branch master updated (52255b0df -> ec8163cd8), gnunet, 2017/01/23
- [GNUnet-SVN] [gnunet] 07/14: handle disconnect properly in test, gnunet, 2017/01/23
- [GNUnet-SVN] [gnunet] 06/14: add generated file to ignore list, gnunet, 2017/01/23
- [GNUnet-SVN] [gnunet] 05/14: get rid of redundant, confusing state, gnunet, 2017/01/23
- [GNUnet-SVN] [gnunet] 12/14: add sender argument to GCCH_handle_local_data so we can implement loopback, gnunet, 2017/01/23
- [GNUnet-SVN] [gnunet] 10/14: towards path desirability calculations, gnunet, 2017/01/23
- [GNUnet-SVN] [gnunet] 02/14: fix shutdown sequence, start to handle loopback, gnunet, 2017/01/23
- [GNUnet-SVN] [gnunet] 11/14: use correct header size calculation in test, gnunet, 2017/01/23
- [GNUnet-SVN] [gnunet] 01/14: allow more than one ACK being given to us at a time, gnunet, 2017/01/23
- [GNUnet-SVN] [gnunet] 09/14: another special case for loopback, gnunet, 2017/01/23
- [GNUnet-SVN] [gnunet] 13/14: avoid asserting in API on timeout destruction,
gnunet <=
- [GNUnet-SVN] [gnunet] 03/14: fix unaligned access, gnunet, 2017/01/23
- [GNUnet-SVN] [gnunet] 04/14: more implementation of loopback handling, gnunet, 2017/01/23
- [GNUnet-SVN] [gnunet] 08/14: beautify disconnect logic a bit, gnunet, 2017/01/23
- [GNUnet-SVN] [gnunet] 14/14: more work on loopback, this time payload transmission (for now without flow control), gnunet, 2017/01/23