From: Christian Grothoff Date: Mon, 26 Sep 2016 23:29:54 +0000 (+0000) Subject: set flag to know that client did call init, thereby avoiding assertion failure on... X-Git-Tag: initial-import-from-subversion-38251~190 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=54966ddcb4b15a8e84e9b7380781284013786980;p=oweals%2Fgnunet.git set flag to know that client did call init, thereby avoiding assertion failure on code that expected initialized client --- diff --git a/src/core/core.h b/src/core/core.h index 7c3a5bdd8..7a6ffa62b 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -44,6 +44,11 @@ */ #define GNUNET_CORE_OPTION_NOTHING 0 +/** + * The client did properly initialize the connection. + */ +#define GNUNET_CORE_OPTION_INIT 1 + /** * Client cares about connectivity changes. */ diff --git a/src/core/core_api.c b/src/core/core_api.c index 67f17352d..1c97a19d2 100644 --- a/src/core/core_api.c +++ b/src/core/core_api.c @@ -815,7 +815,7 @@ reconnect (struct GNUNET_CORE_Handle *h) env = GNUNET_MQ_msg_extra (init, sizeof (uint16_t) * h->hcnt, GNUNET_MESSAGE_TYPE_CORE_INIT); - opt = 0; + opt = GNUNET_CORE_OPTION_INIT; if (NULL != h->inbound_notify) { if (h->inbound_hdr_only) diff --git a/src/core/gnunet-service-core.c b/src/core/gnunet-service-core.c index 2cf43f111..fe7126d03 100644 --- a/src/core/gnunet-service-core.c +++ b/src/core/gnunet-service-core.c @@ -681,6 +681,8 @@ GSC_CLIENTS_notify_client_about_neighbour (struct GSC_Client *client, int old_match; int new_match; + if (GNUNET_CORE_OPTION_NOTHING == client->options) + return; /* client did not yet send init */ old_match = GSC_TYPEMAP_test_match (tmap_old, client->types, client->tcnt);