X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fdatastore%2Fdatastore_api.c;h=916e6acaef930121af9a4bfa04f0be4c72437d35;hb=0945dcf2c250dea65d520ef26f9917e9be3ac4ac;hp=b2fc189475a5d6851e5c3021bf36a600ff6d3b5f;hpb=427b846c6c52194e5246bc913c65ac632f54f604;p=oweals%2Fgnunet.git diff --git a/src/datastore/datastore_api.c b/src/datastore/datastore_api.c index b2fc18947..916e6acae 100644 --- a/src/datastore/datastore_api.c +++ b/src/datastore/datastore_api.c @@ -498,19 +498,17 @@ make_queue_entry (struct GNUNET_DATASTORE_Handle *h, struct GNUNET_DATASTORE_QueueEntry *pos; unsigned int c; - if ( (h->queue_size == max_queue_size) && + if ( (NULL != h->queue_tail) && (h->queue_tail->priority >= queue_priority) ) { - GNUNET_STATISTICS_update (h->stats, - gettext_noop ("# queue overflows"), - 1, - GNUNET_NO); - GNUNET_MQ_discard (env); - return NULL; + c = h->queue_size; + pos = NULL; + } + else + { + c = 0; + pos = h->queue_head; } - - c = 0; - pos = h->queue_head; while ( (NULL != pos) && (c < max_queue_size) && (pos->priority >= queue_priority) )