From f60c78abfbd5f279b30de729046b805bba8e00b0 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 7 Apr 2018 20:14:21 +0300 Subject: Proto_GetStatus is used everywhere instead of PS_GETSTATUS --- plugins/Ping/src/pingthread.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'plugins/Ping/src/pingthread.cpp') diff --git a/plugins/Ping/src/pingthread.cpp b/plugins/Ping/src/pingthread.cpp index 0b21f6aac7..080f044345 100644 --- a/plugins/Ping/src/pingthread.cpp +++ b/plugins/Ping/src/pingthread.cpp @@ -62,15 +62,13 @@ void SetProtoStatus(wchar_t *pszLabel, char *pszProto, int if_status, int new_st SetProtoStatus(pszLabel, pa->szModuleName, if_status, new_status); } else { - if (ProtoServiceExists(pszProto, PS_GETSTATUS)) { - if (CallProtoService(pszProto, PS_GETSTATUS, 0, 0) == if_status) { - if (options.logging) { - wchar_t buf[1024]; - mir_snwprintf(buf, TranslateT("%s - setting status of protocol '%S' (%d)"), pszLabel, pszProto, new_status); - CallService(PLUG "/Log", (WPARAM)buf, 0); - } - CallProtoService(pszProto, PS_SETSTATUS, new_status, 0); + if (Proto_GetStatus(pszProto) == if_status) { + if (options.logging) { + wchar_t buf[1024]; + mir_snwprintf(buf, TranslateT("%s - setting status of protocol '%S' (%d)"), pszLabel, pszProto, new_status); + CallService(PLUG "/Log", (WPARAM)buf, 0); } + CallProtoService(pszProto, PS_SETSTATUS, new_status, 0); } } } -- cgit v1.2.3