From 2fb2f4e0edf9c01ff5ec23429e79e2572e5429be Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 23 Apr 2023 18:09:05 +0300 Subject: code cleaning --- protocols/JabberG/src/jabber_proto.cpp | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index 3b6d5be61e..9faee94630 100644 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -705,6 +705,23 @@ int CJabberProto::GetInfo(MCONTACT hContact, int /*infoType*/) return 0; } +//////////////////////////////////////////////////////////////////////////////////////// +// RecvFile - writes down an incoming file transfer to db + +MEVENT CJabberProto::RecvFile(MCONTACT hContact, PROTORECVFILE *pre) +{ + MEVENT hEvent = CSuper::RecvFile(hContact, pre); + if (hEvent) { + auto *ft = (filetransfer *)pre->lParam; + if (ft && ft->type == FT_HTTP && ft->httpPath) { + DBVARIANT dbv = { DBVT_UTF8 }; + dbv.pszVal = ft->httpPath; + db_event_setJson(hEvent, "u", &dbv); + } + } + return hEvent; +} + //////////////////////////////////////////////////////////////////////////////////////// // SearchBasic - searches the contact by JID @@ -813,20 +830,6 @@ HANDLE CJabberProto::SearchByName(const wchar_t *nick, const wchar_t *firstName, return (HANDLE)pInfo->GetIqId(); } -MEVENT CJabberProto::RecvFile(MCONTACT hContact, PROTORECVFILE *pre) -{ - MEVENT hEvent = CSuper::RecvFile(hContact, pre); - if (hEvent) { - auto *ft = (filetransfer *)pre->lParam; - if (ft && ft->type == FT_HTTP && ft->httpPath) { - DBVARIANT dbv = { DBVT_UTF8 }; - dbv.pszVal = ft->httpPath; - db_event_setJson(hEvent, "u", &dbv); - } - } - return hEvent; -} - //////////////////////////////////////////////////////////////////////////////////////// // SendContacts -- cgit v1.2.3