diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-05-03 17:46:55 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-05-03 17:46:55 +0000 |
commit | 1376117631d89151f5054f69c4f0356aad39916e (patch) | |
tree | 9c8d908e81d70541a6a75d57262447d7e3b50a0f /src/util/server_nc.c | |
parent | 00a452de44319475a603552c9635799612b559f7 (diff) | |
download | gnunet-1376117631d89151f5054f69c4f0356aad39916e.tar.gz gnunet-1376117631d89151f5054f69c4f0356aad39916e.zip |
-fix
Diffstat (limited to 'src/util/server_nc.c')
-rw-r--r-- | src/util/server_nc.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/util/server_nc.c b/src/util/server_nc.c index deb1a18c9..249b7ad40 100644 --- a/src/util/server_nc.c +++ b/src/util/server_nc.c | |||
@@ -180,6 +180,7 @@ handle_client_disconnect (void *cls, struct GNUNET_SERVER_Client *client) | |||
180 | { | 180 | { |
181 | GNUNET_CONTAINER_DLL_remove (pos->pending_head, pos->pending_tail, pml); | 181 | GNUNET_CONTAINER_DLL_remove (pos->pending_head, pos->pending_tail, pml); |
182 | GNUNET_free (pml); | 182 | GNUNET_free (pml); |
183 | pos->num_pending--; | ||
183 | } | 184 | } |
184 | if (pos->th != NULL) | 185 | if (pos->th != NULL) |
185 | { | 186 | { |
@@ -187,6 +188,7 @@ handle_client_disconnect (void *cls, struct GNUNET_SERVER_Client *client) | |||
187 | pos->th = NULL; | 188 | pos->th = NULL; |
188 | } | 189 | } |
189 | GNUNET_SERVER_client_drop (client); | 190 | GNUNET_SERVER_client_drop (client); |
191 | GNUNET_assert (0 == pos->num_pending); | ||
190 | GNUNET_free (pos); | 192 | GNUNET_free (pos); |
191 | } | 193 | } |
192 | 194 | ||
@@ -235,7 +237,9 @@ GNUNET_SERVER_notification_context_destroy (struct | |||
235 | { | 237 | { |
236 | GNUNET_CONTAINER_DLL_remove (pos->pending_head, pos->pending_tail, pml); | 238 | GNUNET_CONTAINER_DLL_remove (pos->pending_head, pos->pending_tail, pml); |
237 | GNUNET_free (pml); | 239 | GNUNET_free (pml); |
240 | pos->num_pending--; | ||
238 | } | 241 | } |
242 | GNUNET_assert (0 == pos->num_pending); | ||
239 | GNUNET_free (pos); | 243 | GNUNET_free (pos); |
240 | } | 244 | } |
241 | if (nc->server != NULL) | 245 | if (nc->server != NULL) |
@@ -313,7 +317,7 @@ transmit_message (void *cls, size_t size, void *buf) | |||
313 | GNUNET_free (pml); | 317 | GNUNET_free (pml); |
314 | cl->num_pending--; | 318 | cl->num_pending--; |
315 | } | 319 | } |
316 | if (pml != NULL) | 320 | if (NULL != pml) |
317 | { | 321 | { |
318 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 322 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
319 | "Have %u messages left in NC queue, will try transmission again\n", | 323 | "Have %u messages left in NC queue, will try transmission again\n", |
@@ -324,7 +328,9 @@ transmit_message (void *cls, size_t size, void *buf) | |||
324 | &transmit_message, cl); | 328 | &transmit_message, cl); |
325 | } | 329 | } |
326 | else | 330 | else |
327 | GNUNET_assert (cl->num_pending == 0); | 331 | { |
332 | GNUNET_assert (0 == cl->num_pending); | ||
333 | } | ||
328 | return ret; | 334 | return ret; |
329 | } | 335 | } |
330 | 336 | ||