From a9f53345421cddea37be81e59d6fb56a9f095d6c Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 20 Sep 2016 09:55:42 +0000 Subject: [PATCH] -fix minor issues --- src/include/gnunet_scalarproduct_service.h | 7 ++++++- src/util/service_new.c | 9 ++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/include/gnunet_scalarproduct_service.h b/src/include/gnunet_scalarproduct_service.h index 8e90d0a45..21e00ca10 100644 --- a/src/include/gnunet_scalarproduct_service.h +++ b/src/include/gnunet_scalarproduct_service.h @@ -55,7 +55,12 @@ enum GNUNET_SCALARPRODUCT_ResponseStatus /** * Operation is still active (never returned, used internally). */ - GNUNET_SCALARPRODUCT_STATUS_ACTIVE = 0, + GNUNET_SCALARPRODUCT_STATUS_INIT = 0, + + /** + * Operation is still active (never returned, used internally). + */ + GNUNET_SCALARPRODUCT_STATUS_ACTIVE = 1, /** * The computation was successful. diff --git a/src/util/service_new.c b/src/util/service_new.c index 123b40d5b..e9c986c43 100644 --- a/src/util/service_new.c +++ b/src/util/service_new.c @@ -384,9 +384,10 @@ service_main (void *cls) GNUNET_SCHEDULER_add_shutdown (&service_shutdown, sh); GNUNET_SERVICE_resume (sh); - sh->service_init_cb (sh->cb_cls, - sh->cfg, - sh); + if (NULL != sh->service_init_cb) + sh->service_init_cb (sh->cb_cls, + sh->cfg, + sh); } @@ -2250,6 +2251,8 @@ resume_client_receive (void *cls) if (GNUNET_YES == c->needs_continue) return; /* #GNUNET_MST_next() did give a message to the client */ /* need to receive more data from the network first */ + if (NULL != c->recv_task) + return; c->recv_task = GNUNET_SCHEDULER_add_read_net (GNUNET_TIME_UNIT_FOREVER_REL, c->sock, -- 2.25.1