From ba8b5469506b3f0caeeead89028a5b61120206e3 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 8 Jan 2024 13:22:45 +0300 Subject: no need to call PSS_GETINFO, PSS_GETAWAYMSG, PSS_FILEALLOW, PSS_FILEDENY & PSS_FILECANCEL via Proto_ChainSend with all those filters etc, the simple call of CallContactService is enough --- plugins/UserInfoEx/src/dlg_propsheet.cpp | 8 ++++---- plugins/UserInfoEx/src/svc_refreshci.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/UserInfoEx') diff --git a/plugins/UserInfoEx/src/dlg_propsheet.cpp b/plugins/UserInfoEx/src/dlg_propsheet.cpp index 28fb93902e..f14314f984 100644 --- a/plugins/UserInfoEx/src/dlg_propsheet.cpp +++ b/plugins/UserInfoEx/src/dlg_propsheet.cpp @@ -1225,12 +1225,12 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar // need meta contact's subcontact information if (DB::Module::IsMetaAndScan(pPs->pszProto)) { - // count valid subcontacts whose protocol supports the PSS_GETINFO service to update the information + // count valid subcontacts whose protocol supports the PS_GETINFO service to update the information int numSubs = db_mc_getSubCount(pPs->hContact); for (int i = 0; i < numSubs; i++) { MCONTACT hSubContact = db_mc_getSub(pPs->hContact, i); if (hSubContact) { - if (ProtoServiceExists(Proto_GetBaseAccountName(hSubContact), PSS_GETINFO)) { + if (ProtoServiceExists(Proto_GetBaseAccountName(hSubContact), PS_GETINFO)) { pPs->infosUpdated = (TAckInfo *)mir_realloc(pPs->infosUpdated, sizeof(TAckInfo) * (pPs->nSubContacts + 1)); pPs->infosUpdated[pPs->nSubContacts].hContact = hSubContact; pPs->infosUpdated[pPs->nSubContacts].acks = nullptr; @@ -1245,7 +1245,7 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar // call the services for (int i = 0; i < pPs->nSubContacts; i++) - if (!ProtoChainSend(pPs->infosUpdated[pPs->nSubContacts].hContact, PSS_GETINFO, NULL, NULL)) + if (!CallContactService(pPs->infosUpdated[pPs->nSubContacts].hContact, PS_GETINFO)) bDo = TRUE; if (bDo) { @@ -1255,7 +1255,7 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar } } } - else if (!ProtoChainSend(pPs->hContact, PSS_GETINFO, NULL, NULL)) { + else if (!CallContactService(pPs->hContact, PS_GETINFO)) { pPs->infosUpdated = (TAckInfo *)mir_calloc(sizeof(TAckInfo)); pPs->infosUpdated[0].hContact = pPs->hContact; pPs->nSubContacts = 1; diff --git a/plugins/UserInfoEx/src/svc_refreshci.cpp b/plugins/UserInfoEx/src/svc_refreshci.cpp index 77a2076b48..d77d5d6a18 100644 --- a/plugins/UserInfoEx/src/svc_refreshci.cpp +++ b/plugins/UserInfoEx/src/svc_refreshci.cpp @@ -594,7 +594,7 @@ class CContactUpdater : public CContactQueue _pProgress->SetTextParam(TranslateT("[b]%s (%S)...[/b]\n%d Contacts remaining"), Clist_GetContactDisplayName(_hContact), pszProto, Size()); if (IsProtoOnline(pszProto)) - for (int i = 0; i < 3 && ProtoChainSend(hContact, PSS_GETINFO, 0, 0); i++) + for (int i = 0; i < 3 && CallContactService(hContact, PS_GETINFO, 0, 0); i++) Sleep(3000); } } -- cgit v1.2.3