From: Christian Grothoff Date: Thu, 29 Oct 2009 23:24:10 +0000 (+0000) Subject: check for connect failure X-Git-Tag: initial-import-from-subversion-38251~23203 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=53e2c52d8a0f812763fe57d13fb2b22d6e51e2b8;p=oweals%2Fgnunet.git check for connect failure --- diff --git a/src/core/core_api.c b/src/core/core_api.c index 2157584ab..2a04e2483 100644 --- a/src/core/core_api.c +++ b/src/core/core_api.c @@ -808,6 +808,12 @@ GNUNET_CORE_connect (struct GNUNET_SCHEDULER_Handle *sched, h->outbound_hdr_only = outbound_hdr_only; h->handlers = handlers; h->client = GNUNET_CLIENT_connect (sched, "core", cfg); + if (h->client == NULL) + { + init (cls, NULL, NULL, NULL); + GNUNET_free (h); + return; + } h->startup_timeout = GNUNET_TIME_relative_to_absolute (timeout); h->hcnt = 0; while (handlers[h->hcnt].callback != NULL)