static void
sock_destroy (void *cls)
{
- GNUNET_CONNECTION_destroy (cls);
+ GNUNET_CONNECTION_destroy (cls, GNUNET_NO);
}
server->clients = pos->next;
else
prev->next = pos->next;
+ if (client->restart_task != GNUNET_SCHEDULER_NO_TASK)
+ GNUNET_SCHEDULER_cancel (server->sched,
+ client->restart_task);
n = server->disconnect_notify_list;
while (n != NULL)
{
n->callback (n->callback_cls, client);
n = n->next;
}
- if (client->restart_task != GNUNET_SCHEDULER_NO_TASK)
- GNUNET_SCHEDULER_cancel (client->server->sched,
- client->restart_task);
}
if (rc > 0)
return;
- if (client->in_process_client_buffer)
+ if (client->in_process_client_buffer == GNUNET_YES)
return;
client->destroy (client->client_closure);
- GNUNET_free (client);
-
-
+ GNUNET_free (client);
}
GNUNET_free (sb);
return;
}
+ if (client->server == NULL)
+ {
+ GNUNET_SERVER_client_disconnect (client);
+ return;
+ }
client->restart_task = GNUNET_SCHEDULER_add_now (client->server->sched,
&restart_processing,
client);