From 909c090503ce1021a69e7793c550b857ef025e77 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 5 Mar 2018 23:14:24 +0300 Subject: switch to the locking schema of db3x_mmap, it's safer --- src/mir_app/src/mdatabasecache.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src') diff --git a/src/mir_app/src/mdatabasecache.cpp b/src/mir_app/src/mdatabasecache.cpp index 30a6639a8a..5c33fcf8c7 100644 --- a/src/mir_app/src/mdatabasecache.cpp +++ b/src/mir_app/src/mdatabasecache.cpp @@ -184,7 +184,6 @@ STDMETHODIMP_(DBVARIANT*) MDatabaseCache::GetCachedValuePtr(MCONTACT contactID, if (index != -1) { V = m_lGlobalSettings[index]; if (bAllocate == -1) { - mir_cslock lck(m_csVal); FreeCachedVariant(&V->value); m_lGlobalSettings.remove(index); mir_free(V); @@ -195,7 +194,6 @@ STDMETHODIMP_(DBVARIANT*) MDatabaseCache::GetCachedValuePtr(MCONTACT contactID, if (bAllocate != 1) return nullptr; - mir_cslock lck(m_csVal); V = (DBCachedGlobalValue*)mir_calloc(sizeof(DBCachedGlobalValue)); V->name = szSetting; m_lGlobalSettings.insert(V); @@ -224,7 +222,6 @@ STDMETHODIMP_(DBVARIANT*) MDatabaseCache::GetCachedValuePtr(MCONTACT contactID, if (bAllocate != 1) return nullptr; - mir_cslock lck(m_csVal); V = (DBCachedContactValue *)mir_calloc(sizeof(DBCachedContactValue)); if (cc->last) cc->last->next = V; @@ -234,7 +231,6 @@ STDMETHODIMP_(DBVARIANT*) MDatabaseCache::GetCachedValuePtr(MCONTACT contactID, V->name = szSetting; } else if (bAllocate == -1) { - mir_cslock lck(m_csVal); m_lastVL = nullptr; FreeCachedVariant(&V->value); if (cc->first == V) { -- cgit v1.2.3