return ce;
ce = ce->next;
}
+ if (NULL == nc)
+ {
+ GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
+ return NULL;
+ }
ce = GNUNET_malloc (sizeof (struct ClientEntry));
ce->client = client;
GNUNET_SERVER_client_keep (client);
struct StatsEntry *pos;
size_t size;
- if (client != NULL)
- make_client_entry (client);
+ if ( (NULL != client) &&
+ (NULL == make_client_entry (client)) )
+ return; /* new client during shutdown */
size = ntohs (message->size) - sizeof (struct GNUNET_MessageHeader);
if (size !=
GNUNET_STRINGS_buffer_tokenize ((const char *) &message[1], size, 2,
int64_t delta;
int changed;
- if (client != NULL)
- make_client_entry (client);
+ if ( (NULL != client) &&
+ (NULL == make_client_entry (client)) )
+ return; /* new client during shutdown */
msize = ntohs (message->size);
if (msize < sizeof (struct GNUNET_STATISTICS_SetMessage))
{
struct WatchEntry *we;
size_t slen;
+ if (NULL == nc)
+ {
+ GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
+ return;
+ }
ce = make_client_entry (client);
msize = ntohs (message->size);
if (msize < sizeof (struct GNUNET_MessageHeader))
struct StatsEntry *se;
save ();
- GNUNET_SERVER_notification_context_destroy (nc);
- nc = NULL;
+ if (NULL != nc)
+ {
+ GNUNET_SERVER_notification_context_destroy (nc);
+ nc = NULL;
+ }
GNUNET_assert (NULL == client_head);
while (NULL != (se = start))
{