aboutsummaryrefslogtreecommitdiff
path: root/src/core/core_api.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-09-11 11:37:02 +0000
committerChristian Grothoff <christian@grothoff.org>2011-09-11 11:37:02 +0000
commit5da59d3885b27b7301ef17d3c2c0da3f4d5a2944 (patch)
treecb24c122b4bb0da2a0411f7ce8c9148f1711fc7f /src/core/core_api.c
parent39589dd2116957e3265c8bd55cf1b9633b1e0b1a (diff)
downloadgnunet-5da59d3885b27b7301ef17d3c2c0da3f4d5a2944.tar.gz
gnunet-5da59d3885b27b7301ef17d3c2c0da3f4d5a2944.zip
allow handlers to be NULL
Diffstat (limited to 'src/core/core_api.c')
-rw-r--r--src/core/core_api.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/core_api.c b/src/core/core_api.c
index 30c86d0d9..cdb050e8e 100644
--- a/src/core/core_api.c
+++ b/src/core/core_api.c
@@ -1379,8 +1379,9 @@ GNUNET_CORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
1379 h->currently_down = GNUNET_YES; 1379 h->currently_down = GNUNET_YES;
1380 h->peers = GNUNET_CONTAINER_multihashmap_create (128); 1380 h->peers = GNUNET_CONTAINER_multihashmap_create (128);
1381 h->retry_backoff = GNUNET_TIME_UNIT_MILLISECONDS; 1381 h->retry_backoff = GNUNET_TIME_UNIT_MILLISECONDS;
1382 while (handlers[h->hcnt].callback != NULL) 1382 if (NULL != handlers)
1383 h->hcnt++; 1383 while (handlers[h->hcnt].callback != NULL)
1384 h->hcnt++;
1384 GNUNET_assert (h->hcnt < 1385 GNUNET_assert (h->hcnt <
1385 (GNUNET_SERVER_MAX_MESSAGE_SIZE - 1386 (GNUNET_SERVER_MAX_MESSAGE_SIZE -
1386 sizeof (struct InitMessage)) / sizeof (uint16_t)); 1387 sizeof (struct InitMessage)) / sizeof (uint16_t));