[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r38029 - gnunet/src/core
From: |
gnunet |
Subject: |
[GNUnet-SVN] r38029 - gnunet/src/core |
Date: |
Tue, 27 Sep 2016 01:29:54 +0200 |
Author: grothoff
Date: 2016-09-27 01:29:54 +0200 (Tue, 27 Sep 2016)
New Revision: 38029
Modified:
gnunet/src/core/core.h
gnunet/src/core/core_api.c
gnunet/src/core/gnunet-service-core.c
Log:
set flag to know that client did call init, thereby avoiding assertion failure
on code that expected initialized client
Modified: gnunet/src/core/core.h
===================================================================
--- gnunet/src/core/core.h 2016-09-26 23:29:22 UTC (rev 38028)
+++ gnunet/src/core/core.h 2016-09-26 23:29:54 UTC (rev 38029)
@@ -45,6 +45,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.
*/
#define GNUNET_CORE_OPTION_SEND_STATUS_CHANGE 4
Modified: gnunet/src/core/core_api.c
===================================================================
--- gnunet/src/core/core_api.c 2016-09-26 23:29:22 UTC (rev 38028)
+++ gnunet/src/core/core_api.c 2016-09-26 23:29:54 UTC (rev 38029)
@@ -815,7 +815,7 @@
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)
Modified: gnunet/src/core/gnunet-service-core.c
===================================================================
--- gnunet/src/core/gnunet-service-core.c 2016-09-26 23:29:22 UTC (rev
38028)
+++ gnunet/src/core/gnunet-service-core.c 2016-09-26 23:29:54 UTC (rev
38029)
@@ -681,6 +681,8 @@
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);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r38029 - gnunet/src/core,
gnunet <=