[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r10695 - gnunet/src/transport
From: |
gnunet |
Subject: |
[GNUnet-SVN] r10695 - gnunet/src/transport |
Date: |
Thu, 25 Mar 2010 14:42:56 +0100 |
Author: grothoff
Date: 2010-03-25 14:42:56 +0100 (Thu, 25 Mar 2010)
New Revision: 10695
Modified:
gnunet/src/transport/transport_api.c
Log:
trying to fix bug
Modified: gnunet/src/transport/transport_api.c
===================================================================
--- gnunet/src/transport/transport_api.c 2010-03-25 13:34:23 UTC (rev
10694)
+++ gnunet/src/transport/transport_api.c 2010-03-25 13:42:56 UTC (rev
10695)
@@ -356,6 +356,12 @@
* Delay until we try to reconnect.
*/
struct GNUNET_TIME_Relative reconnect_delay;
+
+ /**
+ * Set once we are in the process of disconnecting from the
+ * service.
+ */
+ int in_disconnect;
};
@@ -1215,6 +1221,8 @@
/**
* Add neighbour to our list
+ *
+ * @return NULL if this API is currently disconnecting from the service
*/
static struct NeighbourList *
neighbour_add (struct GNUNET_TRANSPORT_Handle *h,
@@ -1222,6 +1230,8 @@
{
struct NeighbourList *n;
+ if (GNUNET_YES == h->in_disconnect)
+ return NULL;
/* check for duplicates */
if (NULL != (n = neighbour_find (h, pid)))
{
@@ -1295,6 +1305,7 @@
#if DEBUG_TRANSPORT
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Transport disconnect called!\n");
#endif
+ handle->in_disconnect = GNUNET_YES;
while (NULL != (n = handle->neighbours))
{
handle->neighbours = n->next;
@@ -1478,6 +1489,8 @@
if (n == NULL)
n = neighbour_add (h,
&cim->id);
+ if (n == NULL)
+ return;
GNUNET_break (n->is_connected == GNUNET_NO);
n->is_connected = GNUNET_YES;
if (h->nc_cb != NULL)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r10695 - gnunet/src/transport,
gnunet <=