diff options
author | George Hazan <ghazan@miranda.im> | 2018-04-02 11:59:43 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-04-02 11:59:43 +0300 |
commit | 82e1444c01f0ab700c385ff0f846858c7f627c36 (patch) | |
tree | b33c5ce0918fb8b5053d0079eecdefe7c8f95b48 /plugins/Dbx_mdbx/src/dbcontacts.cpp | |
parent | 704258cde008db0e80b9d5459833c3c2b6a3f09d (diff) |
Dbx_mdbx:
- unused class members removed;
- added function TouchFile() to change access date & time on loading & exit
Diffstat (limited to 'plugins/Dbx_mdbx/src/dbcontacts.cpp')
-rw-r--r-- | plugins/Dbx_mdbx/src/dbcontacts.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/Dbx_mdbx/src/dbcontacts.cpp b/plugins/Dbx_mdbx/src/dbcontacts.cpp index aa3a27f8f2..f59e57c4b3 100644 --- a/plugins/Dbx_mdbx/src/dbcontacts.cpp +++ b/plugins/Dbx_mdbx/src/dbcontacts.cpp @@ -25,7 +25,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. STDMETHODIMP_(LONG) CDbxMDBX::GetContactCount(void)
{
- return m_contactCount;
+ MDBX_stat st;
+ mdbx_dbi_stat(m_txn_ro, m_dbContacts, &st, sizeof(st));
+ return st.ms_entries;
}
STDMETHODIMP_(LONG) CDbxMDBX::GetContactSize(void)
@@ -78,8 +80,6 @@ STDMETHODIMP_(LONG) CDbxMDBX::DeleteContact(MCONTACT contactID) // free cache item
m_cache->FreeCachedContact(contactID);
DBFlush();
-
- InterlockedDecrement(&m_contactCount);
return 0;
}
@@ -100,7 +100,7 @@ STDMETHODIMP_(MCONTACT) CDbxMDBX::AddContact() }
DBFlush();
- InterlockedIncrement(&m_contactCount);
+
NotifyEventHooks(hContactAddedEvent, dwContactId, 0);
return dwContactId;
}
|