From 8788bb35e10ef5403a08388d33ed4ab2ff7d67df Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 23 Jun 2013 12:32:12 +0000 Subject: new helper applied instead of MS_DB_SETSETTINGRESIDENT git-svn-id: http://svn.miranda-ng.org/main/trunk@5094 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/MSN/src/msn_proto.cpp | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) (limited to 'protocols/MSN/src') diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp index e37531d34c..3834980ec7 100644 --- a/protocols/MSN/src/msn_proto.cpp +++ b/protocols/MSN/src/msn_proto.cpp @@ -43,24 +43,13 @@ CMsnProto::CMsnProto(const char* aProtoName, const TCHAR* aUserName) : lsAvatarQueue(1), msgCache(5, CompareId) { - char path[MAX_PATH]; - ProtoConstructor(this, aProtoName, aUserName); - mir_snprintf(path, sizeof(path), "%s/Status", m_szModuleName); - CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)path); - - mir_snprintf(path, sizeof(path), "%s/IdleTS", m_szModuleName); - CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)path); - - mir_snprintf(path, sizeof(path), "%s/p2pMsgId", m_szModuleName); - CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)path); - - mir_snprintf(path, sizeof(path), "%s/MobileEnabled", m_szModuleName); - CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)path); - - mir_snprintf(path, sizeof(path), "%s/MobileAllowed", m_szModuleName); - CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)path); + db_set_resident(m_szModuleName, "Status"); + db_set_resident(m_szModuleName, "IdleTS"); + db_set_resident(m_szModuleName, "p2pMsgId"); + db_set_resident(m_szModuleName, "MobileEnabled"); + db_set_resident(m_szModuleName, "MobileAllowed"); // Protocol services and events... hMSNNudge = CreateProtoEvent("/Nudge"); @@ -101,6 +90,7 @@ CMsnProto::CMsnProto(const char* aProtoName, const TCHAR* aUserName) : deleteSetting(NULL, "MobileEnabled"); deleteSetting(NULL, "MobileAllowed"); + char path[MAX_PATH]; if (getStaticString(NULL, "LoginServer", path, sizeof(path)) == 0 && (strcmp(path, MSN_DEFAULT_LOGIN_SERVER) == 0 || strcmp(path, MSN_DEFAULT_GATEWAY) == 0)) -- cgit v1.2.3