gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r13737 - gnunet/src/core


From: gnunet
Subject: [GNUnet-SVN] r13737 - gnunet/src/core
Date: Thu, 18 Nov 2010 22:52:39 +0100

Author: grothoff
Date: 2010-11-18 22:52:39 +0100 (Thu, 18 Nov 2010)
New Revision: 13737

Modified:
   gnunet/src/core/gnunet-service-core.c
Log:
code cleanup, set status to DOWN after connection goes DOWN, otherwise we 
generate bogus notifications for clients and fail to re-do key exchange

Modified: gnunet/src/core/gnunet-service-core.c
===================================================================
--- gnunet/src/core/gnunet-service-core.c       2010-11-18 21:51:59 UTC (rev 
13736)
+++ gnunet/src/core/gnunet-service-core.c       2010-11-18 21:52:39 UTC (rev 
13737)
@@ -2739,17 +2739,16 @@
 {
   struct Neighbour *n = cls;
 
+  n->th = NULL;
   if (GNUNET_YES != n->is_connected)
     {
       /* transport should only call us to transmit a message after
        * telling us about a successful connection to the respective peer */
-      n->th = NULL; /* If this happens because of a timeout, reset n-th so 
another message may be sent for this peer! */
 #if DEBUG_CORE
       GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Timeout on notify connect!\n");
 #endif
       return 0;
     }
-  n->th = NULL;
   if (buf == NULL)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_INFO,
@@ -4182,6 +4181,7 @@
       send_to_all_clients (&cnm.header, GNUNET_NO, 
GNUNET_CORE_OPTION_SEND_DISCONNECT);
     }
   n->is_connected = GNUNET_NO;
+  n->status = PEER_STATE_DOWN;
   while (NULL != (car = n->active_client_request_head))
     {
       GNUNET_CONTAINER_DLL_remove (n->active_client_request_head,




reply via email to

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