diff options
author | George Hazan <george.hazan@gmail.com> | 2013-06-23 12:32:12 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-06-23 12:32:12 +0000 |
commit | 8788bb35e10ef5403a08388d33ed4ab2ff7d67df (patch) | |
tree | b79e5efbfb02418b1276442a59e7722252cf39c8 /protocols/MSN/src/msn_proto.cpp | |
parent | 05ccb4dcd0b507fb000426667ed3f25c0b93db2b (diff) |
new helper applied instead of MS_DB_SETSETTINGRESIDENT
git-svn-id: http://svn.miranda-ng.org/main/trunk@5094 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MSN/src/msn_proto.cpp')
-rw-r--r-- | protocols/MSN/src/msn_proto.cpp | 22 |
1 files changed, 6 insertions, 16 deletions
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))
|