From e96132b4d5344d2d58d247906bcaefccfb9d5253 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 20 Dec 2023 13:34:45 +0300 Subject: DBEVENTINFO::hContact to be returned inside an event, no need to call db_event_getContact() just after db_event_get() --- plugins/Dbx_mdbx/src/dbevents.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/Dbx_mdbx/src') diff --git a/plugins/Dbx_mdbx/src/dbevents.cpp b/plugins/Dbx_mdbx/src/dbevents.cpp index 3cbb5e5e5a..b43a2eaa46 100644 --- a/plugins/Dbx_mdbx/src/dbevents.cpp +++ b/plugins/Dbx_mdbx/src/dbevents.cpp @@ -188,12 +188,12 @@ bool CDbxMDBX::EditEvent(MCONTACT hContact, MEVENT hDbEvent, const DBEVENTINFO * dbe.flags = dbei->flags; dbe.wEventType = dbei->eventType; dbe.cbBlob = dbei->cbBlob; - uint8_t *pBlob = dbei->pBlob; + char *pBlob = dbei->pBlob; - mir_ptr pCryptBlob; + mir_ptr pCryptBlob; if (m_bEncrypted) { size_t len; - uint8_t *pResult = m_crypto->encodeBuffer(pBlob, dbe.cbBlob, &len); + char *pResult = (char*)m_crypto->encodeBuffer(pBlob, dbe.cbBlob, &len); if (pResult != nullptr) { pCryptBlob = pBlob = pResult; dbe.cbBlob = (uint16_t)len; @@ -310,10 +310,10 @@ BOOL CDbxMDBX::GetEvent(MEVENT hDbEvent, DBEVENTINFO *dbei) dbei->flags = dbe->flags; dbei->eventType = dbe->wEventType; - uint32_t cbBlob = dbe->cbBlob; + int cbBlob = dbe->cbBlob; size_t bytesToCopy = cbBlob; if (dbei->cbBlob == -1) - dbei->pBlob = (uint8_t*)mir_calloc(cbBlob + 2); + dbei->pBlob = (char *)mir_calloc(cbBlob + 2); else if (dbei->cbBlob < cbBlob) bytesToCopy = dbei->cbBlob; -- cgit v1.2.3