summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'protocols')
-rw-r--r--protocols/JabberG/src/jabber_file.cpp25
1 files changed, 12 insertions, 13 deletions
diff --git a/protocols/JabberG/src/jabber_file.cpp b/protocols/JabberG/src/jabber_file.cpp
index 24ea2c6296..c96f6ae92c 100644
--- a/protocols/JabberG/src/jabber_file.cpp
+++ b/protocols/JabberG/src/jabber_file.cpp
@@ -46,19 +46,18 @@ void __cdecl CJabberProto::OfflineFileThread(OFDTHREAD *param)
// download the page
NLHR_PTR nlhrReply(Netlib_HttpTransaction(m_hNetlibUser, &nlhr));
- if (nlhrReply) {
- if (nlhrReply->resultCode == 200) {
- FILE *f = _wfopen(param->wszPath, L"wb");
- fwrite(nlhrReply->pData, 1, nlhrReply->dataLength, f);
- fclose(f);
-
- blob.setSize(nlhrReply->dataLength);
- blob.write(dbei);
- db_event_edit(param->hDbEvent, &dbei);
-
- if (param->bOpen)
- ShellExecute(nullptr, L"open", param->wszPath, nullptr, nullptr, SW_SHOWDEFAULT);
- }
+ if (nlhrReply && nlhrReply->resultCode == 200) {
+ FILE *f = _wfopen(param->wszPath, L"wb");
+ fwrite(nlhrReply->pData, 1, nlhrReply->dataLength, f);
+ fclose(f);
+
+ DBVARIANT dbv = { DBVT_DWORD };
+ dbv.dVal = nlhrReply->dataLength;
+ db_event_setJson(param->hDbEvent, "ft", &dbv);
+ db_event_setJson(param->hDbEvent, "fs", &dbv);
+
+ if (param->bOpen)
+ ShellExecute(nullptr, L"open", param->wszPath, nullptr, nullptr, SW_SHOWDEFAULT);
}
}
}