From b660fac5560005706aeab0a0d5ad2b32bdcaf929 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 1 Jun 2015 17:20:04 +0000 Subject: - 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 --- src/core/stdautoaway/src/autoaway.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/core/stdautoaway') 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); -- cgit v1.2.3