diff options
author | George Hazan <george.hazan@gmail.com> | 2023-12-20 13:34:45 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-12-20 13:34:45 +0300 |
commit | e96132b4d5344d2d58d247906bcaefccfb9d5253 (patch) | |
tree | 24a9524e4900547f2ba3a461e228fd3c98c0410d /plugins/Dbx_mdbx/src | |
parent | 4dac8bd56f9116ac76423b2664286ed894ca80c2 (diff) |
DBEVENTINFO::hContact to be returned inside an event, no need to call db_event_getContact() just after db_event_get()
Diffstat (limited to 'plugins/Dbx_mdbx/src')
-rw-r--r-- | plugins/Dbx_mdbx/src/dbevents.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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<uint8_t> pCryptBlob;
+ mir_ptr<char> 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;
|