From 047d858220e73039d7243af4ccff3414a58cb022 Mon Sep 17 00:00:00 2001 From: YuQing <384681@qq.com> Date: Thu, 26 Oct 2023 10:51:30 +0800 Subject: [PATCH] adapt to the newest sf_send_done_callback --- storage/storage_service.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/storage/storage_service.c b/storage/storage_service.c index d1a882d..d1ba65e 100644 --- a/storage/storage_service.c +++ b/storage/storage_service.c @@ -1578,7 +1578,7 @@ static int sock_accept_done_callback(struct fast_task_info *task, } static int sock_send_done_callback(struct fast_task_info *pTask, - const int length) + const int length, int *next_stage) { StorageClientInfo *pClientInfo; @@ -1599,10 +1599,13 @@ static int sock_send_done_callback(struct fast_task_info *pTask, /* response done, try to recv again */ pClientInfo->total_length = 0; pClientInfo->total_offset = 0; + *next_stage = SF_NIO_STAGE_RECV; return 0; } else //continue to send file content { + *next_stage = SF_NIO_STAGE_SEND; + /* continue read from file */ return storage_dio_queue_push(pTask); }