X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=chunk_queue.c;h=468b1dc2dd4828796d53e5804d6f28611b88c462;hp=5b102f286641d7b93418f3ae92e7dcdf6f71d0f6;hb=f393aab6b6e8c7413c02b4e198666ad95570066c;hpb=5667dca4697c3bbbe4830699ee91df800bf2efd3 diff --git a/chunk_queue.c b/chunk_queue.c index 5b102f28..468b1dc2 100644 --- a/chunk_queue.c +++ b/chunk_queue.c @@ -11,7 +11,6 @@ #include "para.h" #include "list.h" #include "afh.h" -#include "vss.h" #include "string.h" #include "error.h" @@ -82,12 +81,14 @@ struct queued_chunk *cq_peek(struct chunk_queue *cq) /** * Remove the current chunk from the queue. * - * \param cq The chunk to remove. + * \param cq The queue to remove from. */ void cq_dequeue(struct chunk_queue *cq) { struct queued_chunk *qc = cq_peek(cq); assert(qc); + assert(cq->num_pending >= qc->num_bytes); + cq->num_pending -= qc->num_bytes; list_del(&qc->node); free(qc); }