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 --- protocols/Dummy/src/dummy_proto.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'protocols/Dummy/src/dummy_proto.cpp') diff --git a/protocols/Dummy/src/dummy_proto.cpp b/protocols/Dummy/src/dummy_proto.cpp index 3dd8c0ee4a..f95c8ccfb4 100644 --- a/protocols/Dummy/src/dummy_proto.cpp +++ b/protocols/Dummy/src/dummy_proto.cpp @@ -61,7 +61,14 @@ CDummyProto::CDummyProto(const char *szModuleName, const wchar_t *ptszUserName) msgid = 0; - uniqueIdText[0] = '\0'; + int id = getTemplateId(); + ptrA setting(id > 0 ? mir_strdup(templates[id].setting) : getStringA(DUMMY_ID_SETTING)); + if (setting != NULL) { + strncpy_s(uniqueIdText, setting, _TRUNCATE); + Proto_SetUniqueId(m_szModuleName, uniqueIdText); + } + else uniqueIdText[0] = '\0'; + uniqueIdSetting[0] = '\0'; dummy_Instances.insert(this); @@ -113,15 +120,6 @@ DWORD_PTR CDummyProto::GetCaps(int type, MCONTACT) strncpy_s(uniqueIdSetting, setting, _TRUNCATE); } return (DWORD_PTR)uniqueIdSetting; - - case PFLAG_UNIQUEIDSETTING: - if (uniqueIdText[0] == '\0') { - int id = getTemplateId(); - ptrA setting(id > 0 ? mir_strdup(templates[id].setting) : getStringA(DUMMY_ID_SETTING)); - if (setting != NULL) - strncpy_s(uniqueIdText, setting, _TRUNCATE); - } - return (DWORD_PTR)uniqueIdText; } return 0; } -- cgit v1.2.3