From 81337e86426dd4a79836554342bdc2e7e6195769 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 18 Jun 2013 14:12:13 +0000 Subject: massive extinction of stupid service name's buffers git-svn-id: http://svn.miranda-ng.org/main/trunk@5010 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/CSList/src/cslist.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'plugins/CSList/src/cslist.cpp') diff --git a/plugins/CSList/src/cslist.cpp b/plugins/CSList/src/cslist.cpp index 34b32f470c..0ce1c3f5cd 100644 --- a/plugins/CSList/src/cslist.cpp +++ b/plugins/CSList/src/cslist.cpp @@ -100,12 +100,9 @@ static int OnCreateMenuItems(WPARAM, LPARAM) PROTOACCOUNT** pdesc; ProtoEnumAccounts(&protoCount, &pdesc); - for (int i = 0; i < protoCount; i++) { - char szService[100]; - mir_snprintf(szService, SIZEOF(szService), "%s%s", pdesc[i]->szModuleName, PS_SETCUSTOMSTATUSEX); - if ( ServiceExists(szService)) + for (int i = 0; i < protoCount; i++) + if ( ProtoServiceExists(pdesc[i]->szModuleName, PS_SETCUSTOMSTATUSEX)) addProtoStatusMenuItem(pdesc[i]->szModuleName); - } return 0; } @@ -189,9 +186,7 @@ void SetStatus(WORD code, StatusItem* item, char *szAccName) if (pdescr == NULL) return; - char szService[100]; - mir_snprintf(szService, SIZEOF(szService), "%s%s", szAccName, PS_SETCUSTOMSTATUSEX); - if ( !ServiceExists(szService)) + if ( !ProtoServiceExists(szAccName, PS_SETCUSTOMSTATUSEX)) return; int statusToSet; @@ -212,7 +207,7 @@ void SetStatus(WORD code, StatusItem* item, char *szAccName) else return; ics.status = &statusToSet; - CallService(szService, 0, (LPARAM)&ics); + CallProtoService(szAccName, PS_SETCUSTOMSTATUSEX, 0, (LPARAM)&ics); } INT_PTR showList(WPARAM wparam, LPARAM lparam, LPARAM param) -- cgit v1.2.3