summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-04-13 20:24:02 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-04-13 20:24:02 +0300
commit2961e3abc63fcb1f61a83dbaf4221a569af92e08 (patch)
tree4d92280105679627b4f1305f3130ec6e83fba7e6
parentd66399cf623b9d2b3407327069fa67bd81cde43c (diff)
fix for hangups in Jabber
-rwxr-xr-xplugins/Dbx_sqlite/src/dbsettings.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/Dbx_sqlite/src/dbsettings.cpp b/plugins/Dbx_sqlite/src/dbsettings.cpp
index 74c9dde075..fc6f6c4c3a 100755
--- a/plugins/Dbx_sqlite/src/dbsettings.cpp
+++ b/plugins/Dbx_sqlite/src/dbsettings.cpp
@@ -150,14 +150,16 @@ BOOL CDbxSQLite::DeleteContactSetting(MCONTACT hContact, LPCSTR szModule, LPCSTR
return 1;
}
+ // if a setting isn't found in cache, then return an error - we don't cache misses anymore
char *szCachedSettingName = m_cache->GetCachedSetting(szModule, szSetting, mir_strlen(szModule), mir_strlen(szSetting));
+ if (m_cache->GetCachedValuePtr(hContact, szCachedSettingName, -1) == nullptr)
+ return 1;
+
if (szCachedSettingName[-1] == 0) { // it's not a resident variable
DeleteContactSettingWorker(hContact, szModule, szSetting);
DBFlush();
}
- m_cache->GetCachedValuePtr(hContact, szCachedSettingName, -1);
-
// notify
DBCONTACTWRITESETTING dbcws = { 0 };
dbcws.szModule = szModule;