summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mir_core/db.cpp3
-rw-r--r--src/modules/database/dbintf.cpp6
-rw-r--r--src/modules/extraicons/ExtraIconGroup.cpp4
-rw-r--r--src/modules/extraicons/IcolibExtraIcon.cpp4
4 files changed, 3 insertions, 14 deletions
diff --git a/src/mir_core/db.cpp b/src/mir_core/db.cpp
index 7b04b6eab4..08703f6581 100644
--- a/src/mir_core/db.cpp
+++ b/src/mir_core/db.cpp
@@ -318,7 +318,6 @@ MIR_CORE_DLL(BOOL) db_set_resident(const char *szModule, const char *szService,
return FALSE;
char str[MAXMODULELABELLENGTH * 2];
- strncpy_s(str,szModule,strlen(szModule));
- strncat_s(str,szService,strlen(szService));
+ mir_snprintf(str, SIZEOF(str), "%s/%s", szModule, szService);
return currDb->SetSettingResident(bEnable, str);
}
diff --git a/src/modules/database/dbintf.cpp b/src/modules/database/dbintf.cpp
index e95caff6c4..c1c69cece8 100644
--- a/src/modules/database/dbintf.cpp
+++ b/src/modules/database/dbintf.cpp
@@ -179,11 +179,6 @@ static INT_PTR srvEnumContactSettings(WPARAM wParam,LPARAM lParam)
return (currDb) ? (INT_PTR)currDb->EnumContactSettings((HANDLE)wParam, (DBCONTACTENUMSETTINGS*)lParam) : 0;
}
-static INT_PTR srvSetSettingResident(WPARAM wParam,LPARAM lParam)
-{
- return (currDb) ? (INT_PTR)currDb->SetSettingResident(wParam, (char*)lParam) : 0;
-}
-
static INT_PTR srvEnumResidentSettings(WPARAM wParam,LPARAM lParam)
{
return (currDb) ? (INT_PTR)currDb->EnumResidentSettings((DBMODULEENUMPROC)wParam, (void*)lParam) : 0;
@@ -274,7 +269,6 @@ int LoadDbintfModule()
CreateServiceFunction(MS_DB_CONTACT_WRITESETTING, srvWriteContactSetting);
CreateServiceFunction(MS_DB_CONTACT_DELETESETTING, srvDeleteContactSetting);
CreateServiceFunction(MS_DB_CONTACT_ENUMSETTINGS, srvEnumContactSettings);
- CreateServiceFunction(MS_DB_SETSETTINGRESIDENT, srvSetSettingResident);
CreateServiceFunction("DB/ResidentSettings/Enum", srvEnumResidentSettings);
CreateServiceFunction(MS_DB_REGISTER_PLUGIN, srvRegisterPlugin);
diff --git a/src/modules/extraicons/ExtraIconGroup.cpp b/src/modules/extraicons/ExtraIconGroup.cpp
index 5da0f4f9b3..696728e4e2 100644
--- a/src/modules/extraicons/ExtraIconGroup.cpp
+++ b/src/modules/extraicons/ExtraIconGroup.cpp
@@ -26,9 +26,7 @@ Boston, MA 02111-1307, USA.
ExtraIconGroup::ExtraIconGroup(const char *_name) :
ExtraIcon(_name), setValidExtraIcon(false), insideApply(false)
{
- char setting[512];
- mir_snprintf(setting, SIZEOF(setting), "%s/%s", MODULE_NAME, _name);
- CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (WPARAM) setting);
+ db_set_resident(MODULE_NAME, _name);
}
ExtraIconGroup::~ExtraIconGroup()
diff --git a/src/modules/extraicons/IcolibExtraIcon.cpp b/src/modules/extraicons/IcolibExtraIcon.cpp
index dc20e94572..0b67630d17 100644
--- a/src/modules/extraicons/IcolibExtraIcon.cpp
+++ b/src/modules/extraicons/IcolibExtraIcon.cpp
@@ -30,9 +30,7 @@ IcolibExtraIcon::IcolibExtraIcon(int _id, const char *_name, const TCHAR *_descr
MIRANDAHOOKPARAM _OnClick, LPARAM _param) :
BaseExtraIcon(_id, _name, _description, _descIcon, _OnClick, _param)
{
- char setting[512];
- mir_snprintf(setting, SIZEOF(setting), "%s/%s", MODULE_NAME, _name);
- CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (WPARAM) setting);
+ db_set_resident(MODULE_NAME, _name);
}
IcolibExtraIcon::~IcolibExtraIcon()