diff --git a/src/algo_utils.c b/src/algo_utils.c index 8e6e19b..ccacddd 100644 --- a/src/algo_utils.c +++ b/src/algo_utils.c @@ -119,6 +119,7 @@ void mv_buffer_rtof(struct algo_ctx* app_ctx, struct evt_core_fdinfo* from) { bp->mode = BP_READING; bp->aread = 0; + bp->ap_count = 0; g_queue_push_tail (app_ctx->free_buffer, bp); g_hash_table_remove(app_ctx->used_buffer, &(from->fd)); } @@ -131,6 +132,7 @@ void mv_buffer_wtof(struct algo_ctx* app_ctx, struct evt_core_fdinfo* fdinfo) { } bp->mode = BP_READING; bp->aread = 0; + bp->ap_count = 0; g_queue_push_tail (app_ctx->free_buffer, bp); g_hash_table_remove(app_ctx->used_buffer, &(fdinfo->fd)); } @@ -187,6 +189,7 @@ void mv_buffer_atof(struct algo_ctx* app_ctx, void* from) { // 2. Reset it bp->mode = BP_READING; bp->aread = 0; + bp->ap_count = 0; // 3. We move it g_hash_table_remove (app_ctx->application_waiting, from);