From 2961e3abc63fcb1f61a83dbaf4221a569af92e08 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 13 Apr 2021 20:24:02 +0300 Subject: fix for hangups in Jabber --- plugins/Dbx_sqlite/src/dbsettings.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'plugins') 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; -- cgit v1.2.3