diff options
author | George Hazan <ghazan@miranda.im> | 2018-03-05 23:14:24 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-03-05 23:14:24 +0300 |
commit | 909c090503ce1021a69e7793c550b857ef025e77 (patch) | |
tree | cda68b2aff3f4ff7a47c592a1f6d83e9dd3f12fa /src/mir_app | |
parent | 94c711953d71b21e4cc4c950dec921b253ae0d54 (diff) |
switch to the locking schema of db3x_mmap, it's safer
Diffstat (limited to 'src/mir_app')
-rw-r--r-- | src/mir_app/src/mdatabasecache.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
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) {
|