summaryrefslogtreecommitdiff
path: root/plugins/Dbx_mdb/src/dbsettings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Dbx_mdb/src/dbsettings.cpp')
-rw-r--r--plugins/Dbx_mdb/src/dbsettings.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/plugins/Dbx_mdb/src/dbsettings.cpp b/plugins/Dbx_mdb/src/dbsettings.cpp
index 95faa27a68..9c48880618 100644
--- a/plugins/Dbx_mdb/src/dbsettings.cpp
+++ b/plugins/Dbx_mdb/src/dbsettings.cpp
@@ -345,7 +345,6 @@ STDMETHODIMP_(BOOL) CDbxMdb::SetSettingResident(BOOL bIsResident, const char *ps
char *szSetting = m_cache->GetCachedSetting(NULL, pszSettingName, 0, (int)strlen(pszSettingName));
szSetting[-1] = (char)bIsResident;
- mir_cslock lck(m_csDbAccess);
int idx = m_lResidentSettings.getIndex(szSetting);
if (idx == -1) {
if (bIsResident)
@@ -372,13 +371,11 @@ STDMETHODIMP_(BOOL) CDbxMdb::WriteContactSetting(MCONTACT contactID, DBCONTACTWR
{
if (dbcwNotif.value.pszVal != NULL)
{
- char* val = mir_utf8encodeW(dbcwNotif.value.pwszVal);
+ T2Utf val(dbcwNotif.value.pwszVal);
if (val == NULL)
return 1;
- dbcwNotif.value.pszVal = (char*)alloca(strlen(val) + 1);
- strcpy(dbcwNotif.value.pszVal, val);
- mir_free(val);
+ dbcwNotif.value.pszVal = NEWSTR_ALLOCA(val);
dbcwNotif.value.type = DBVT_UTF8;
}
else return 1;