gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet] 03/04: do not die if client closes port it never o


From: gnunet
Subject: [GNUnet-SVN] [gnunet] 03/04: do not die if client closes port it never opened
Date: Sat, 13 Jan 2018 14:55:47 +0100

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

grothoff pushed a commit to branch master
in repository gnunet.

commit 58e2f8eadb20e527ebcefc04a906fb1f0e856e31
Author: Christian Grothoff <address@hidden>
AuthorDate: Sat Jan 13 14:46:26 2018 +0100

    do not die if client closes port it never opened
---
 src/cadet/gnunet-service-cadet.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/cadet/gnunet-service-cadet.c b/src/cadet/gnunet-service-cadet.c
index c3e99e0eb..20e4c363e 100644
--- a/src/cadet/gnunet-service-cadet.c
+++ b/src/cadet/gnunet-service-cadet.c
@@ -75,7 +75,7 @@ struct CadetClient
    * Handle to communicate with the client
    */
   struct GNUNET_MQ_Handle *mq;
-  
+
   /**
    * Client handle.
    */
@@ -536,6 +536,13 @@ handle_port_close (void *cls,
        "Closing port %s as requested by %s\n",
        GNUNET_h2s (&pmsg->port),
        GSC_2s (c));
+  if (NULL == c->ports)
+  {
+    /* Client closed a port despite _never_ having opened one? */
+    GNUNET_break (0);
+    GNUNET_SERVICE_client_drop (c->client);
+    return;
+  }
   op = GNUNET_CONTAINER_multihashmap_get (c->ports,
                                          &pmsg->port);
   if (NULL == op)

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



reply via email to

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