diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-05-30 15:57:15 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-05-30 15:57:15 +0000 |
commit | 37f4dcbcb4fcb6d7390346cf86f84281b38b5ab6 (patch) | |
tree | b135782f7ff24dd9c7411bdef0291fc2df58f721 /src/datastore | |
parent | b590fc07325156f3b2507112b2ae8fd38b914379 (diff) | |
download | gnunet-37f4dcbcb4fcb6d7390346cf86f84281b38b5ab6.tar.gz gnunet-37f4dcbcb4fcb6d7390346cf86f84281b38b5ab6.zip |
do not reset in_receive unless called from receive
Diffstat (limited to 'src/datastore')
-rw-r--r-- | src/datastore/datastore_api.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/datastore/datastore_api.c b/src/datastore/datastore_api.c index 65c14f673..6bf9abaca 100644 --- a/src/datastore/datastore_api.c +++ b/src/datastore/datastore_api.c | |||
@@ -371,14 +371,17 @@ timeout_queue_entry (void *cls, | |||
371 | const struct GNUNET_SCHEDULER_TaskContext *tc) | 371 | const struct GNUNET_SCHEDULER_TaskContext *tc) |
372 | { | 372 | { |
373 | struct GNUNET_DATASTORE_QueueEntry *qe = cls; | 373 | struct GNUNET_DATASTORE_QueueEntry *qe = cls; |
374 | int in_receive; | ||
374 | 375 | ||
375 | GNUNET_STATISTICS_update (qe->h->stats, | 376 | GNUNET_STATISTICS_update (qe->h->stats, |
376 | gettext_noop ("# queue entry timeouts"), | 377 | gettext_noop ("# queue entry timeouts"), |
377 | 1, | 378 | 1, |
378 | GNUNET_NO); | 379 | GNUNET_NO); |
379 | qe->task = GNUNET_SCHEDULER_NO_TASK; | 380 | qe->task = GNUNET_SCHEDULER_NO_TASK; |
380 | GNUNET_assert (qe->was_transmitted == GNUNET_NO); | 381 | GNUNET_assert (qe->was_transmitted == GNUNET_NO); |
382 | in_receive = qe->h->in_receive; | ||
381 | qe->response_proc (qe->h, NULL); | 383 | qe->response_proc (qe->h, NULL); |
384 | qe->h->in_receive = in_receive; | ||
382 | } | 385 | } |
383 | 386 | ||
384 | 387 | ||
@@ -408,6 +411,7 @@ make_queue_entry (struct GNUNET_DATASTORE_Handle *h, | |||
408 | struct GNUNET_DATASTORE_QueueEntry *ret; | 411 | struct GNUNET_DATASTORE_QueueEntry *ret; |
409 | struct GNUNET_DATASTORE_QueueEntry *pos; | 412 | struct GNUNET_DATASTORE_QueueEntry *pos; |
410 | unsigned int c; | 413 | unsigned int c; |
414 | int in_receive; | ||
411 | 415 | ||
412 | c = 0; | 416 | c = 0; |
413 | pos = h->queue_head; | 417 | pos = h->queue_head; |
@@ -462,6 +466,7 @@ make_queue_entry (struct GNUNET_DATASTORE_Handle *h, | |||
462 | ret->task = GNUNET_SCHEDULER_add_delayed (timeout, | 466 | ret->task = GNUNET_SCHEDULER_add_delayed (timeout, |
463 | &timeout_queue_entry, | 467 | &timeout_queue_entry, |
464 | ret); | 468 | ret); |
469 | in_receive = h->in_receive; | ||
465 | pos = ret->next; | 470 | pos = ret->next; |
466 | while (pos != NULL) | 471 | while (pos != NULL) |
467 | { | 472 | { |
@@ -486,6 +491,7 @@ make_queue_entry (struct GNUNET_DATASTORE_Handle *h, | |||
486 | } | 491 | } |
487 | pos = pos->next; | 492 | pos = pos->next; |
488 | } | 493 | } |
494 | h->in_receive = in_receive; | ||
489 | return ret; | 495 | return ret; |
490 | } | 496 | } |
491 | 497 | ||