update src/common/transfer.cpp.

Signed-off-by: liupeng298 <liupeng298@huawei.com>
This commit is contained in:
liupeng298 2024-07-30 13:04:31 +00:00 committed by Gitee
parent bbf17597b6
commit 93a8c5e65c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -201,19 +201,17 @@ out:
void HdcTransferBase::Next(HdcTransferBase *thisClass, CtxFile *context)
{
if (!req->result && context->fileSize > 0) {
if (context->isDir && context->master) {
uint8_t payload = 1;
thisClass->CommandDispatch(CMD_FILE_FINISH, &payload, 1);
} else if (context->isDir && !context->master) {
uint8_t payload = 1;
thisClass->SendToAnother(CMD_FILE_FINISH, &payload, 1);
} else {
thisClass->TransferSummary(context);
thisClass->TaskFinish();
}
return;
if (context->isDir && context->master) {
uint8_t payload = 1;
thisClass->CommandDispatch(CMD_FILE_FINISH, &payload, 1);
} else if (context->isDir && !context->master) {
uint8_t payload = 1;
thisClass->SendToAnother(CMD_FILE_FINISH, &payload, 1);
} else {
thisClass->TransferSummary(context);
thisClass->TaskFinish();
}
return;
}
void HdcTransferBase::OnFileIO(uv_fs_t *req)