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/Ping/src/pingthread.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'plugins/Ping') diff --git a/plugins/Ping/src/pingthread.cpp b/plugins/Ping/src/pingthread.cpp index 41ed11239a..5e13f0b9b0 100644 --- a/plugins/Ping/src/pingthread.cpp +++ b/plugins/Ping/src/pingthread.cpp @@ -71,17 +71,14 @@ void SetProtoStatus(char *pszLabel, char *pszProto, int if_status, int new_statu SetProtoStatus(pszLabel, pppDesc[i]->szModuleName, if_status, new_status); } } else { - char get_status[512], set_status[512]; - mir_snprintf(get_status, 512, "%s%s", pszProto, PS_GETSTATUS); - if(ServiceExists(get_status)) { - mir_snprintf(set_status, 512, "%s%s", pszProto, PS_SETSTATUS); - if(CallService(get_status, 0, 0) == if_status) { + if(ProtoServiceExists(pszProto, PS_GETSTATUS)) { + if(CallProtoService(pszProto, PS_GETSTATUS, 0, 0) == if_status) { if(options.logging) { char buf[1024]; mir_snprintf(buf, 1024, Translate("%s - setting status of protocol '%s' (%d)"), pszLabel, pszProto, new_status); CallService(PLUG "/Log", (WPARAM)buf, 0); } - CallService(set_status, new_status, 0); + CallProtoService(pszProto, PS_SETSTATUS, new_status, 0); } } } -- cgit v1.2.3