"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);
"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);
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;