aboutsummaryrefslogtreecommitdiff
path: root/src/arm
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-03-09 11:39:50 +0000
committerChristian Grothoff <christian@grothoff.org>2012-03-09 11:39:50 +0000
commit48b2340e57c4e3d460818effc0510f1a0d576b4e (patch)
treef51b79174ea9afaf01558096d23b1e1138f1f686 /src/arm
parenta50e66888a0df9aa76761c879e0ede9056f1d121 (diff)
downloadgnunet-48b2340e57c4e3d460818effc0510f1a0d576b4e.tar.gz
gnunet-48b2340e57c4e3d460818effc0510f1a0d576b4e.zip
-fixing #2201
Diffstat (limited to 'src/arm')
-rw-r--r--src/arm/arm_api.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/arm/arm_api.c b/src/arm/arm_api.c
index 452dd34c4..c352cbdae 100644
--- a/src/arm/arm_api.c
+++ b/src/arm/arm_api.c
@@ -1,6 +1,6 @@
1/* 1/*
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 (C) 2009, 2010 Christian Grothoff (and other contributing authors) 3 (C) 2009, 2010, 2012 Christian Grothoff (and other contributing authors)
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published 6 it under the terms of the GNU General Public License as published
@@ -83,6 +83,11 @@ struct ShutdownContext
83 void *cont_cls; 83 void *cont_cls;
84 84
85 /** 85 /**
86 * Handle for transmission request.
87 */
88 struct GNUNET_CLIENT_TransmitHandle *th;
89
90 /**
86 * Result of the operation 91 * Result of the operation
87 */ 92 */
88 enum GNUNET_ARM_ProcessStatus confirmed; 93 enum GNUNET_ARM_ProcessStatus confirmed;
@@ -177,9 +182,10 @@ service_shutdown_cancel (void *cls,
177static size_t 182static size_t
178write_shutdown (void *cls, size_t size, void *buf) 183write_shutdown (void *cls, size_t size, void *buf)
179{ 184{
180 struct GNUNET_MessageHeader *msg;
181 struct ShutdownContext *shutdown_ctx = cls; 185 struct ShutdownContext *shutdown_ctx = cls;
186 struct GNUNET_MessageHeader *msg;
182 187
188 shutdown_ctx->th = NULL;
183 if (size < sizeof (struct GNUNET_MessageHeader)) 189 if (size < sizeof (struct GNUNET_MessageHeader))
184 { 190 {
185 LOG (GNUNET_ERROR_TYPE_WARNING, 191 LOG (GNUNET_ERROR_TYPE_WARNING,
@@ -229,11 +235,10 @@ arm_service_shutdown (struct GNUNET_CLIENT_Connection *sock,
229 shutdown_ctx->sock = sock; 235 shutdown_ctx->sock = sock;
230 shutdown_ctx->timeout = GNUNET_TIME_relative_to_absolute (timeout); 236 shutdown_ctx->timeout = GNUNET_TIME_relative_to_absolute (timeout);
231 shutdown_ctx->confirmed = GNUNET_ARM_PROCESS_COMMUNICATION_ERROR; 237 shutdown_ctx->confirmed = GNUNET_ARM_PROCESS_COMMUNICATION_ERROR;
232 /* FIXME: store return value? */ 238 shutdown_ctx->th = GNUNET_CLIENT_notify_transmit_ready (sock,
233 GNUNET_CLIENT_notify_transmit_ready (sock, 239 sizeof (struct GNUNET_MessageHeader),
234 sizeof (struct GNUNET_MessageHeader), 240 timeout, GNUNET_NO, &write_shutdown,
235 timeout, GNUNET_YES, &write_shutdown, 241 shutdown_ctx);
236 shutdown_ctx);
237} 242}
238 243
239 244