summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'protocols')
-rw-r--r--protocols/ICQ-WIM/src/proto.cpp10
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;
}