summaryrefslogtreecommitdiff
path: root/src/modules/database
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/database')
-rw-r--r--src/modules/database/dbini.cpp14
-rw-r--r--src/modules/database/dbintf.cpp6
2 files changed, 4 insertions, 16 deletions
diff --git a/src/modules/database/dbini.cpp b/src/modules/database/dbini.cpp
index 6b56ad2f9a..8c5aa31fce 100644
--- a/src/modules/database/dbini.cpp
+++ b/src/modules/database/dbini.cpp
@@ -362,23 +362,17 @@ static void ProcessIniFile(TCHAR* szIniPath, char *szSafeSections, char *szUnsaf
case 'N':
case 'H':
{
- PBYTE buf;
int len;
char *pszValue, *pszEnd;
- DBCONTACTWRITESETTING cws;
- buf = (PBYTE)mir_alloc(lstrlenA(szValue+1));
+ PBYTE buf = (PBYTE)mir_alloc(lstrlenA(szValue+1));
for (len = 0, pszValue = szValue+1;;len++) {
buf[len] = (BYTE)strtol(pszValue, &pszEnd, 0x10);
- if (pszValue == pszEnd) break;
+ if (pszValue == pszEnd)
+ break;
pszValue = pszEnd;
}
- cws.szModule = szSection;
- cws.szSetting = szName;
- cws.value.type = DBVT_BLOB;
- cws.value.pbVal = buf;
- cws.value.cpbVal = len;
- CallService(MS_DB_CONTACT_WRITESETTING, (WPARAM)(HANDLE)NULL, (LPARAM)&cws);
+ db_set_blob(NULL, szSection, szName, buf, len);
mir_free(buf);
}
break;
diff --git a/src/modules/database/dbintf.cpp b/src/modules/database/dbintf.cpp
index 78102a8e80..4c37e0884a 100644
--- a/src/modules/database/dbintf.cpp
+++ b/src/modules/database/dbintf.cpp
@@ -76,11 +76,6 @@ static INT_PTR srvGetContactSettingStatic(WPARAM wParam,LPARAM lParam)
return (currDb) ? (INT_PTR)currDb->GetContactSettingStatic((HANDLE)wParam, (DBCONTACTGETSETTING*)lParam) : 0;
}
-static INT_PTR srvWriteContactSetting(WPARAM wParam,LPARAM lParam)
-{
- return (currDb) ? (INT_PTR)currDb->WriteContactSetting((HANDLE)wParam, (DBCONTACTWRITESETTING*)lParam) : 0;
-}
-
static INT_PTR srvEnumContactSettings(WPARAM wParam,LPARAM lParam)
{
return (currDb) ? (INT_PTR)currDb->EnumContactSettings((HANDLE)wParam, (DBCONTACTENUMSETTINGS*)lParam) : 0;
@@ -155,7 +150,6 @@ int LoadDbintfModule()
CreateServiceFunction(MS_DB_MODULES_ENUM, srvEnumModuleNames);
CreateServiceFunction(MS_DB_CONTACT_GETSETTINGSTATIC, srvGetContactSettingStatic);
- CreateServiceFunction(MS_DB_CONTACT_WRITESETTING, srvWriteContactSetting);
CreateServiceFunction(MS_DB_CONTACT_ENUMSETTINGS, srvEnumContactSettings);
CreateServiceFunction("DB/ResidentSettings/Enum", srvEnumResidentSettings);