From 4c14624bcaf66f0fb9e24a8566078282983f0389 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Thu, 26 Jul 2012 15:54:51 +0000 Subject: [PATCH] - don't clear th immediately, in case notify_cb calls notify_tmt_rdy --- src/mesh/mesh_api.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesh/mesh_api.c b/src/mesh/mesh_api.c index cf2963ca7..040b87d71 100644 --- a/src/mesh/mesh_api.c +++ b/src/mesh/mesh_api.c @@ -1203,7 +1203,6 @@ send_callback (void *cls, size_t size, void *buf) size_t psize; LOG (GNUNET_ERROR_TYPE_DEBUG, "Send packet() Buffer %u\n", size); - h->th = NULL; if ((0 == size) || (NULL == buf)) { LOG (GNUNET_ERROR_TYPE_DEBUG, "Received NULL send callback\n"); @@ -1328,6 +1327,7 @@ send_callback (void *cls, size_t size, void *buf) LOG (GNUNET_ERROR_TYPE_DEBUG, " [%p] notify: %p, size %u\n", th, th->notify, th->size); + GNUNET_assert (NULL != t); LOG (GNUNET_ERROR_TYPE_DEBUG, " pid %u, max %u\n", t->pid, t->max_pid); if (GNUNET_NO == th_is_payload (th) || @@ -1337,6 +1337,7 @@ send_callback (void *cls, size_t size, void *buf) break; } } + h->th = NULL; if (GNUNET_YES == request) { -- 2.25.1