diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-01 17:20:04 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-01 17:20:04 +0000 |
commit | b660fac5560005706aeab0a0d5ad2b32bdcaf929 (patch) | |
tree | d8db661d0b0e025156c3706e93f1aafa22708358 /src/core | |
parent | 098b75ec924b6a52328e3803f5bf9e5f45835f5d (diff) |
- ProtoCallService() function considered too dangerous and therefore isn't exported anymore, it's closed in the core, CallProtoService() is used instead everywhere;
- fixes for some quirks with PS_* calls.
git-svn-id: http://svn.miranda-ng.org/main/trunk@13959 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/miranda.h | 2 | ||||
-rw-r--r-- | src/core/stdautoaway/src/autoaway.cpp | 7 | ||||
-rw-r--r-- | src/core/stdchat/src/window.cpp | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/src/core/miranda.h b/src/core/miranda.h index c5008e358a..5d31e64aed 100644 --- a/src/core/miranda.h +++ b/src/core/miranda.h @@ -142,6 +142,8 @@ void KillModuleMenus(int hLangpack); extern LIST<PROTOACCOUNT> accounts;
+INT_PTR ProtoCallService(LPCSTR szModule, const char *szService, WPARAM wParam, LPARAM lParam);
+
PROTOACCOUNT* Proto_CreateAccount(const char *szModuleName, const char *szBaseProto, const TCHAR *tszAccountName);
PROTOACCOUNT* __fastcall Proto_GetAccount(const char *accName);
diff --git a/src/core/stdautoaway/src/autoaway.cpp b/src/core/stdautoaway/src/autoaway.cpp index f501ec2bda..e3aa0603de 100644 --- a/src/core/stdautoaway/src/autoaway.cpp +++ b/src/core/stdautoaway/src/autoaway.cpp @@ -45,12 +45,11 @@ static bool Proto_IsAccountLocked(PROTOACCOUNT *pa) return pa && db_get_b(NULL, pa->szModuleName, "LockMainStatus", 0) != 0;
}
-static void Proto_SetStatus(const char* szProto, unsigned status)
+static void Proto_SetStatus(const char *szProto, unsigned status)
{
if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND) {
- TCHAR *awayMsg = (TCHAR*)CallService(MS_AWAYMSG_GETSTATUSMSGW, status, (LPARAM)szProto);
- CallProtoService(szProto, PS_SETAWAYMSG, status, (LPARAM)awayMsg);
- mir_free(awayMsg);
+ ptrT awayMsg((TCHAR*)CallService(MS_AWAYMSG_GETSTATUSMSGW, status, (LPARAM)szProto));
+ CallProtoService(szProto, PS_SETAWAYMSG, status, awayMsg);
}
CallProtoService(szProto, PS_SETSTATUS, status, 0);
diff --git a/src/core/stdchat/src/window.cpp b/src/core/stdchat/src/window.cpp index 806fa9a128..e8e9071dd4 100644 --- a/src/core/stdchat/src/window.cpp +++ b/src/core/stdchat/src/window.cpp @@ -989,7 +989,7 @@ static void ProcessNickListHovering(HWND hwnd, int hoveredItem, SESSION_INFO *si USERINFO *ui = pci->SM_GetUserFromIndex(si->ptszID, si->pszModule, currentHovered);
if (ui) {
if (ProtoServiceExists(si->pszModule, MS_GC_PROTO_GETTOOLTIPTEXT)) {
- TCHAR *p = (TCHAR*)ProtoCallService(si->pszModule, MS_GC_PROTO_GETTOOLTIPTEXT, (WPARAM)si->ptszID, (LPARAM)ui->pszUID);
+ TCHAR *p = (TCHAR*)CallProtoService(si->pszModule, MS_GC_PROTO_GETTOOLTIPTEXT, (WPARAM)si->ptszID, (LPARAM)ui->pszUID);
if (p != NULL) {
_tcsncpy_s(tszBuf, p, _TRUNCATE);
mir_free(p);
|