diff options
author | George Hazan <ghazan@miranda.im> | 2018-04-07 20:14:21 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-04-07 20:14:21 +0300 |
commit | f60c78abfbd5f279b30de729046b805bba8e00b0 (patch) | |
tree | 1120bba828b2151604e98163aa7a3fe221264068 /plugins/Ping/src | |
parent | 26a653ecae7edbeefb7966e08714e152c73b78eb (diff) |
Proto_GetStatus is used everywhere instead of PS_GETSTATUS
Diffstat (limited to 'plugins/Ping/src')
-rw-r--r-- | plugins/Ping/src/pingthread.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
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);
}
}
}
|