diff options
author | grothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96> | 2009-10-29 23:24:10 +0000 |
---|---|---|
committer | grothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96> | 2009-10-29 23:24:10 +0000 |
commit | 56a4987f5da80ef9eec2c92b9b817a3ae248456c (patch) | |
tree | 4aea113d1ea6187ce8298fa05589420e123d2261 /src | |
parent | 06a2fcca83fee1b9f919cbedfe2a5f6671fdaa30 (diff) |
check for connect failure
git-svn-id: https://gnunet.org/svn/gnunet@9345 140774ce-b5e7-0310-ab8b-a85725594a96
Diffstat (limited to 'src')
-rw-r--r-- | src/core/core_api.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/core_api.c b/src/core/core_api.c index 2157584ab7..2a04e24831 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) |