gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnunet] branch master updated: fix for #5612


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated: fix for #5612
Date: Sat, 02 Mar 2019 10:34:07 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 0b30ad775 fix for #5612
0b30ad775 is described below

commit 0b30ad775e6f62d8fcbd0523f4fe0fc8197db7e5
Author: Christian Grothoff <address@hidden>
AuthorDate: Sat Mar 2 10:33:56 2019 +0100

    fix for #5612
---
 src/util/client.c | 29 ++++++++++++++++++++++-------
 1 file changed, 22 insertions(+), 7 deletions(-)

diff --git a/src/util/client.c b/src/util/client.c
index 9bdb09e30..356123e94 100644
--- a/src/util/client.c
+++ b/src/util/client.c
@@ -258,6 +258,8 @@ transmit_ready (void *cls)
   int notify_in_flight;
 
   cstate->send_task = NULL;
+  if (GNUNET_YES == cstate->in_destroy)
+    return;
   pos = (const char *) cstate->msg;
   len = ntohs (cstate->msg->size);
   GNUNET_assert (cstate->msg_off < len);
@@ -378,6 +380,21 @@ connection_client_destroy_impl (struct GNUNET_MQ_Handle 
*mq,
   struct ClientState *cstate = impl_state;
 
   (void) mq;
+  if (NULL != cstate->dns_active)
+  {
+    GNUNET_RESOLVER_request_cancel (cstate->dns_active);
+    cstate->dns_active = NULL;
+  }
+  if (NULL != cstate->send_task)
+  {
+    GNUNET_SCHEDULER_cancel (cstate->send_task);
+    cstate->send_task = NULL;
+  }
+  if (NULL != cstate->retry_task)
+  {
+    GNUNET_SCHEDULER_cancel (cstate->retry_task);
+    cstate->retry_task = NULL;
+  }
   if (GNUNET_SYSERR == cstate->in_destroy)
   {
     /* defer destruction */
@@ -385,15 +402,13 @@ connection_client_destroy_impl (struct GNUNET_MQ_Handle 
*mq,
     cstate->mq = NULL;
     return;
   }
-  if (NULL != cstate->dns_active)
-    GNUNET_RESOLVER_request_cancel (cstate->dns_active);
-  if (NULL != cstate->send_task)
-    GNUNET_SCHEDULER_cancel (cstate->send_task);
   if (NULL != cstate->recv_task)
+  {
     GNUNET_SCHEDULER_cancel (cstate->recv_task);
-  if (NULL != cstate->retry_task)
-    GNUNET_SCHEDULER_cancel (cstate->retry_task);
-  if (NULL != cstate->sock){
+    cstate->recv_task = NULL;
+  }
+  if (NULL != cstate->sock)
+  {
     LOG (GNUNET_ERROR_TYPE_DEBUG,
          "destroying socket: %p\n",
          cstate->sock);

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]