diff options
author | George Hazan <george.hazan@gmail.com> | 2023-07-24 14:10:57 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-07-24 14:10:57 +0300 |
commit | 9fdfef02c6c6fd4a8f2c6f10c952c76762ab85a0 (patch) | |
tree | 36b4f02db994f673800c613741a36be4abfd77ad | |
parent | 695277eb06da17fed42782c43dc11f1e55653600 (diff) |
fixes #3592 (ICQ: offline transfer isn't marked as completed after file downloading)
-rw-r--r-- | protocols/ICQ-WIM/src/proto.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/protocols/ICQ-WIM/src/proto.cpp b/protocols/ICQ-WIM/src/proto.cpp index 91db22a652..27af8879f2 100644 --- a/protocols/ICQ-WIM/src/proto.cpp +++ b/protocols/ICQ-WIM/src/proto.cpp @@ -197,13 +197,17 @@ void CIcqProto::OnFileRecv(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest *pReq) return;
}
- int result = _write(fileId, pReply->pData, pReply->dataLength);
+ int cbWritten = _write(fileId, pReply->pData, pReply->dataLength);
_close(fileId);
- if (result != pReply->dataLength) {
- debugLogW(L"Error writing data into [%s]", ofd->wszPath.c_str());
+ if (cbWritten != pReply->dataLength) {
+ debugLogW(L"Error writing data into [%s]: %d instead of %d", ofd->wszPath.c_str(), cbWritten, pReply->dataLength);
return;
}
+ DBVARIANT dbv = { DBVT_DWORD };
+ dbv.dVal = cbWritten;
+ db_event_setJson(ofd->hDbEvent, "ft", &dbv);
+
ofd->Finish();
delete ofd;
}
|