fixes
authorChristian Grothoff <christian@grothoff.org>
Wed, 17 Feb 2010 14:20:12 +0000 (14:20 +0000)
committerChristian Grothoff <christian@grothoff.org>
Wed, 17 Feb 2010 14:20:12 +0000 (14:20 +0000)
src/core/gnunet-service-core.c
src/transport/transport_api.c
src/util/server_nc.c

index b879a31c56eec407b6dcfaec16862aac07582588..b07d565f1f0d2a658c7646e56c0a35919079b6cf 100644 (file)
@@ -3194,6 +3194,11 @@ handle_transport_notify_disconnect (void *cls,
               "Peer `%4s' disconnected from us.\n", GNUNET_i2s (peer));
 #endif
   n = find_neighbour (peer);
+  if (n == NULL)
+    {
+      GNUNET_break (0);
+      return;
+    }
   GNUNET_break (n->is_connected);
   cnm.header.size = htons (sizeof (struct DisconnectNotifyMessage));
   cnm.header.type = htons (GNUNET_MESSAGE_TYPE_CORE_NOTIFY_DISCONNECT);
index 337adc364bf5bdbf4ffb82bebbcbc0f5b9f3f10b..a4282607f775ff777dc324d657bede815300f7e3 100644 (file)
@@ -1464,7 +1464,7 @@ demultiplexer (void *cls, const struct GNUNET_MessageHeader *msg)
                   "DISCONNECT",
                  GNUNET_i2s (&dim->peer));
 #endif
-      n = neighbour_find (h, &cim->id);
+      n = neighbour_find (h, &dim->id);
       GNUNET_break (n != NULL);
       if (n != NULL)
        neighbour_disconnect (n);      
index 61775c6a1df5f7fbeaa3cbeb72e333f826303dc7..88de62c63f4a20a1b1cb9112ca1825b1969912f1 100644 (file)
@@ -220,8 +220,8 @@ GNUNET_SERVER_notification_context_destroy (struct GNUNET_SERVER_NotificationCon
   while (NULL != (pos = nc->clients))
     {
       nc->clients = pos->next;
-      GNUNET_SERVER_receive_done (pos->client, GNUNET_NO);
       GNUNET_SERVER_client_drop (pos->client); 
+      GNUNET_SERVER_receive_done (pos->client, GNUNET_NO);
       while (NULL != (pml = pos->pending_head))
        {
          pos->pending_head = pml->next;