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/stdautoaway | |
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/stdautoaway')
-rw-r--r-- | src/core/stdautoaway/src/autoaway.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
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);
|