From e7b69721b0d390cec3f81f97134a51bfef228cf8 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 28 Mar 2018 20:01:30 +0300 Subject: PFLAG_UNIQUEIDSETTING removed, its functionality transferred to Proto_SetUniqueId / Proto_GetUniqueId --- plugins/Variables/src/contact.cpp | 2 +- plugins/Variables/src/parse_miranda.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'plugins/Variables/src') diff --git a/plugins/Variables/src/contact.cpp b/plugins/Variables/src/contact.cpp index 52ecf66950..6a49e0b4f5 100644 --- a/plugins/Variables/src/contact.cpp +++ b/plugins/Variables/src/contact.cpp @@ -309,7 +309,7 @@ static int contactSettingChanged(WPARAM hContact, LPARAM lParam) if (szProto == nullptr) return 0; - char *uid = (char*)CallProtoService(szProto, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0); + const char *uid = Proto_GetUniqueId(szProto); bool isNick = !strcmp(dbw->szSetting, "Nick"); bool isFirstName = !strcmp(dbw->szSetting, "FirstName"); diff --git a/plugins/Variables/src/parse_miranda.cpp b/plugins/Variables/src/parse_miranda.cpp index 0dad8e92a0..43610db3fc 100644 --- a/plugins/Variables/src/parse_miranda.cpp +++ b/plugins/Variables/src/parse_miranda.cpp @@ -343,20 +343,20 @@ static wchar_t* parseProtoInfo(ARGUMENTSINFO *ai) if (ai->argc != 3) return nullptr; - char *szRes = nullptr; + const char *szRes = nullptr; wchar_t *tszRes = nullptr; ptrA szProto(mir_u2a(ai->targv[1])); if (!mir_wstrcmp(ai->targv[2], _A2W(STR_PINAME))) tszRes = Hlp_GetProtocolName(szProto); else if (!mir_wstrcmp(ai->targv[2], _A2W(STR_PIUIDTEXT))) { - szRes = (char *)CallProtoService(szProto, PS_GETCAPS, (WPARAM)PFLAG_UNIQUEIDTEXT, 0); - if (INT_PTR(szRes) == CALLSERVICE_NOTFOUND) + szRes = (const char *)CallProtoService(szProto, PS_GETCAPS, (WPARAM)PFLAG_UNIQUEIDTEXT, 0); + if (INT_PTR(szRes) == CALLSERVICE_NOTFOUND || szRes == nullptr) return nullptr; } else if (!mir_wstrcmp(ai->targv[2], _A2W(STR_PIUIDSETTING))) { - szRes = (char *)CallProtoService(szProto, PS_GETCAPS, (WPARAM)PFLAG_UNIQUEIDSETTING, 0); - if (INT_PTR(szRes) == CALLSERVICE_NOTFOUND) + szRes = Proto_GetUniqueId(szProto); + if (szRes == nullptr) return nullptr; } else if (!mir_wstrcmp(ai->targv[2], _A2W(STR_PINICK))) -- cgit v1.2.3