From: Christian Grothoff Date: Thu, 20 Oct 2011 17:36:42 +0000 (+0000) Subject: do terminate properly X-Git-Tag: initial-import-from-subversion-38251~16364 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=2e81faa7f1cda0c7532dfaca3af257750954d0cb;p=oweals%2Fgnunet.git do terminate properly --- diff --git a/src/arm/arm_api.c b/src/arm/arm_api.c index f61eea6fd..fed002708 100644 --- a/src/arm/arm_api.c +++ b/src/arm/arm_api.c @@ -143,8 +143,13 @@ service_shutdown_handler (void *cls, const struct GNUNET_MessageHeader *msg) shutdown_ctx->confirmed = GNUNET_YES; GNUNET_CLIENT_receive (shutdown_ctx->sock, &service_shutdown_handler, shutdown_ctx, GNUNET_TIME_UNIT_FOREVER_REL); + if (shutdown_ctx->cont != NULL) + shutdown_ctx->cont (shutdown_ctx->cont_cls, GNUNET_YES); + GNUNET_SCHEDULER_cancel (shutdown_ctx->cancel_task); + GNUNET_CLIENT_disconnect (shutdown_ctx->sock, GNUNET_NO); + GNUNET_free (shutdown_ctx); break; - default: /* Fall through */ + default: #if DEBUG_ARM LOG (GNUNET_ERROR_TYPE_DEBUG, "Service shutdown refused!\n"); #endif