From: Bart Polot Date: Thu, 26 Jul 2012 15:54:51 +0000 (+0000) Subject: - don't clear th immediately, in case notify_cb calls notify_tmt_rdy X-Git-Tag: initial-import-from-subversion-38251~12317 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4c14624bcaf66f0fb9e24a8566078282983f0389;p=oweals%2Fgnunet.git - don't clear th immediately, in case notify_cb calls notify_tmt_rdy --- 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) {