diff options
author | George Hazan <george.hazan@gmail.com> | 2024-01-19 13:39:51 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-01-19 13:39:51 +0300 |
commit | 4f96ac493ef8e912cd1507fe79e4831a8cf7efb0 (patch) | |
tree | 1353aaa74990b265161a7ac97191d6983bb6f01c | |
parent | ffd5d3db80f0f4d97747e2810ea55b7fb9a3ad98 (diff) |
code cleaning
-rw-r--r-- | include/m_protosvc.h | 2 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/core.cpp | 2 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/filetransfer.cpp | 2 | ||||
-rw-r--r-- | protocols/ICQ-WIM/src/server.cpp | 2 | ||||
-rw-r--r-- | protocols/IRCG/src/commandmonitor.cpp | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_file.cpp | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_ft.cpp | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_iq_handlers.cpp | 2 | ||||
-rw-r--r-- | protocols/Sametime/src/files.cpp | 2 | ||||
-rw-r--r-- | protocols/Telegram/src/proto.cpp | 2 | ||||
-rw-r--r-- | protocols/Telegram/src/utils.cpp | 2 | ||||
-rw-r--r-- | protocols/Tox/src/tox_transfer.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/file.cpp | 4 |
13 files changed, 14 insertions, 14 deletions
diff --git a/include/m_protosvc.h b/include/m_protosvc.h index 95c9e57e60..74626d3c0c 100644 --- a/include/m_protosvc.h +++ b/include/m_protosvc.h @@ -775,7 +775,7 @@ struct PROTORECVFILE MAllCStrings descr; // file description
int fileCount; // number of files being transferred
MAllCStringArray files; // array of file names
- LPARAM lParam; // extra space for the network level protocol module
+ void *pUserInfo; // extra space for the network level protocol module
const char *szId; // server message id
const char *szUserId; // groupchat user id
const char *szReplyId; // this message is a reply to a message with that server id
diff --git a/protocols/Gadu-Gadu/src/core.cpp b/protocols/Gadu-Gadu/src/core.cpp index dd2271de69..22513f3cf2 100644 --- a/protocols/Gadu-Gadu/src/core.cpp +++ b/protocols/Gadu-Gadu/src/core.cpp @@ -1031,7 +1031,7 @@ retry: pre.timestamp = time(0);
pre.descr.a = fileName;
pre.files.a = &fileName;
- pre.lParam = (LPARAM)dcc7;
+ pre.pUserInfo = dcc7;
ProtoChainRecvFile((UINT_PTR)dcc7->contact, &pre);
e->event.dcc7_new = nullptr;
diff --git a/protocols/Gadu-Gadu/src/filetransfer.cpp b/protocols/Gadu-Gadu/src/filetransfer.cpp index 2ee8642021..cebb9279a1 100644 --- a/protocols/Gadu-Gadu/src/filetransfer.cpp +++ b/protocols/Gadu-Gadu/src/filetransfer.cpp @@ -372,7 +372,7 @@ void __cdecl GaduProto::dccmainthread(void*) pre.timestamp = time(0);
pre.descr.a = pszFileName;
pre.files.a = &pszFileName;
- pre.lParam = (LPARAM)local_dcc;
+ pre.pUserInfo = local_dcc;
gg_LeaveCriticalSection(&ft_mutex, "dccmainthread", 37, 7, "ft_mutex", 1);
ProtoChainRecvFile((UINT_PTR)local_dcc->contact, &pre);
diff --git a/protocols/ICQ-WIM/src/server.cpp b/protocols/ICQ-WIM/src/server.cpp index f67596ea6f..7fd5181ea7 100644 --- a/protocols/ICQ-WIM/src/server.cpp +++ b/protocols/ICQ-WIM/src/server.cpp @@ -604,7 +604,7 @@ void CIcqProto::ParseMessage(MCONTACT hContact, __int64 &lastMsgId, const JSONNo pre.timestamp = iMsgTime;
pre.files.w = &m_wszShortName;
pre.descr.w = pFileInfo->wszDescr;
- pre.lParam = (LPARAM)pFileInfo;
+ pre.pUserInfo = pFileInfo;
if (bCreateRead)
pre.dwFlags |= PRFF_READ;
if (bIsOutgoing)
diff --git a/protocols/IRCG/src/commandmonitor.cpp b/protocols/IRCG/src/commandmonitor.cpp index 5e8fff44fb..917147ea89 100644 --- a/protocols/IRCG/src/commandmonitor.cpp +++ b/protocols/IRCG/src/commandmonitor.cpp @@ -1155,7 +1155,7 @@ bool CIrcProto::IsCTCP(const CIrcMessage *pmsg) pre.timestamp = (uint32_t)time(0);
pre.fileCount = 1;
pre.files.w = &tszTemp;
- pre.lParam = (LPARAM)di;
+ pre.pUserInfo = di;
ProtoChainRecvFile(hContact, &pre);
}
}
diff --git a/protocols/JabberG/src/jabber_file.cpp b/protocols/JabberG/src/jabber_file.cpp index 547257a570..30ee8c1fed 100644 --- a/protocols/JabberG/src/jabber_file.cpp +++ b/protocols/JabberG/src/jabber_file.cpp @@ -180,7 +180,7 @@ void CJabberProto::FileProcessHttpDownload(MCONTACT hContact, const char *jid, c pre.fileCount = 1;
pre.timestamp = time(0);
pre.files.a = &pszName;
- pre.lParam = (LPARAM)ft;
+ pre.pUserInfo = ft;
pre.descr.a = pszDescr;
ProtoChainRecvFile(ft->std.hContact, &pre);
}
diff --git a/protocols/JabberG/src/jabber_ft.cpp b/protocols/JabberG/src/jabber_ft.cpp index f4f088daa6..0da72701ad 100644 --- a/protocols/JabberG/src/jabber_ft.cpp +++ b/protocols/JabberG/src/jabber_ft.cpp @@ -471,7 +471,7 @@ void CJabberProto::FtHandleSiRequest(const TiXmlElement *iqNode) pre.fileCount = 1;
pre.timestamp = time(0);
pre.files.a = &filename;
- pre.lParam = (LPARAM)ft;
+ pre.pUserInfo = ft;
pre.descr.a = XmlGetChildText(fileNode, "desc");
ProtoChainRecvFile(ft->std.hContact, &pre);
return;
diff --git a/protocols/JabberG/src/jabber_iq_handlers.cpp b/protocols/JabberG/src/jabber_iq_handlers.cpp index cf2c92e799..d7abb95ff2 100644 --- a/protocols/JabberG/src/jabber_iq_handlers.cpp +++ b/protocols/JabberG/src/jabber_iq_handlers.cpp @@ -329,7 +329,7 @@ bool CJabberProto::OnIqRequestOOB(const TiXmlElement*, CJabberIqInfo *pInfo) pre.descr.a = desc;
pre.files.a = &str2;
pre.fileCount = 1;
- pre.lParam = (LPARAM)ft;
+ pre.pUserInfo = ft;
ProtoChainRecvFile(ft->std.hContact, &pre);
}
else { // reject
diff --git a/protocols/Sametime/src/files.cpp b/protocols/Sametime/src/files.cpp index ba14846747..7f82f74ca5 100644 --- a/protocols/Sametime/src/files.cpp +++ b/protocols/Sametime/src/files.cpp @@ -41,7 +41,7 @@ void mwFileTransfer_offered(mwFileTransfer* ft) pre.timestamp = time(0);
pre.descr.a = description;
pre.files.a = &filename;
- pre.lParam = (LPARAM)ft;
+ pre.pUserInfo = ft;
ProtoChainRecvFile(hContact, &pre);
}
diff --git a/protocols/Telegram/src/proto.cpp b/protocols/Telegram/src/proto.cpp index 8d15a38f33..b506218b48 100644 --- a/protocols/Telegram/src/proto.cpp +++ b/protocols/Telegram/src/proto.cpp @@ -357,7 +357,7 @@ INT_PTR CTelegramProto::GetCaps(int type, MCONTACT) MEVENT CTelegramProto::RecvFile(MCONTACT hContact, PROTORECVFILE *pre) { - auto *ft = (TG_FILE_REQUEST *)pre->lParam; + auto *ft = (TG_FILE_REQUEST *)pre->pUserInfo; return (ft->m_bRecv) ? CSuper::RecvFile(hContact, pre) : 0; } diff --git a/protocols/Telegram/src/utils.cpp b/protocols/Telegram/src/utils.cpp index ddf70e97ea..48445a4a45 100644 --- a/protocols/Telegram/src/utils.cpp +++ b/protocols/Telegram/src/utils.cpp @@ -408,7 +408,7 @@ bool CTelegramProto::GetMessageFile( pre.fileCount = 1;
pre.timestamp = pMsg->date_;
pre.files.a = &pszFileName;
- pre.lParam = (LPARAM)pRequest;
+ pre.pUserInfo = pRequest;
pre.szId = pszId;
pre.szUserId = pszUserId;
if (!caption.empty())
diff --git a/protocols/Tox/src/tox_transfer.cpp b/protocols/Tox/src/tox_transfer.cpp index 11b9c993bc..e5f12a2b8c 100644 --- a/protocols/Tox/src/tox_transfer.cpp +++ b/protocols/Tox/src/tox_transfer.cpp @@ -58,7 +58,7 @@ void CToxProto::OnFriendFile(Tox *tox, uint32_t friendNumber, uint32_t fileNumbe pre.timestamp = now();
pre.descr.w = L"";
pre.files.w = &name;
- pre.lParam = (LPARAM)transfer;
+ pre.pUserInfo = transfer;
ProtoChainRecvFile(hContact, &pre);
}
break;
diff --git a/src/mir_app/src/file.cpp b/src/mir_app/src/file.cpp index 4b1b1c843f..4be92ea9be 100644 --- a/src/mir_app/src/file.cpp +++ b/src/mir_app/src/file.cpp @@ -262,7 +262,7 @@ MEVENT Proto_RecvFile(MCONTACT hContact, PROTORECVFILE *pre) DB::FILE_BLOB blob(wszFiles, wszDescr); if (auto *ppro = Proto_GetContactInstance(hContact)) - ppro->OnReceiveOfflineFile(blob, (void*)pre->lParam); + ppro->OnReceiveOfflineFile(blob, pre->pUserInfo); blob.write(dbei); MEVENT hdbe = db_event_add(hContact, &dbei); @@ -273,7 +273,7 @@ MEVENT Proto_RecvFile(MCONTACT hContact, PROTORECVFILE *pre) CLISTEVENT cle = {}; cle.hContact = hContact; cle.hDbEvent = hdbe; - cle.lParam = pre->lParam; + cle.lParam = LPARAM(pre->pUserInfo); if (!bSilent && File::bAutoAccept && Contact::OnList(hContact)) LaunchRecvDialog(&cle); |