summaryrefslogtreecommitdiff
path: root/plugins/Import
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-12-20 13:34:45 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-12-20 13:34:45 +0300
commite96132b4d5344d2d58d247906bcaefccfb9d5253 (patch)
tree24a9524e4900547f2ba3a461e228fd3c98c0410d /plugins/Import
parent4dac8bd56f9116ac76423b2664286ed894ca80c2 (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/Import')
-rw-r--r--plugins/Import/src/dbrw/dbevents.cpp2
-rw-r--r--plugins/Import/src/import.cpp2
-rw-r--r--plugins/Import/src/patterns.cpp2
-rw-r--r--plugins/Import/src/textjson.cpp2
4 files changed, 4 insertions, 4 deletions
diff --git a/plugins/Import/src/dbrw/dbevents.cpp b/plugins/Import/src/dbrw/dbevents.cpp
index 95fc34eca3..1fbea90b86 100644
--- a/plugins/Import/src/dbrw/dbevents.cpp
+++ b/plugins/Import/src/dbrw/dbevents.cpp
@@ -88,7 +88,7 @@ STDMETHODIMP_(BOOL) CDbxSQLite::GetEvent(MEVENT hDbEvent, DBEVENTINFO *dbei)
uint32_t cbBlob = sqlite3_column_int(stmt, 5);
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;
diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp
index e743d13cc8..659189da72 100644
--- a/plugins/Import/src/import.cpp
+++ b/plugins/Import/src/import.cpp
@@ -888,7 +888,7 @@ void CImportBatch::ImportHistory(MCONTACT hContact, PROTOACCOUNT **protocol, int
// Copy the event and import it
DB::EventInfo dbei;
dbei.cbBlob = srcDb->GetBlobSize(hEvent);
- dbei.pBlob = (uint8_t*)mir_alloc(dbei.cbBlob+1);
+ dbei.pBlob = (char *)mir_alloc(dbei.cbBlob+1);
bool bSkipThis = false;
if (!srcDb->GetEvent(hEvent, &dbei)) {
diff --git a/plugins/Import/src/patterns.cpp b/plugins/Import/src/patterns.cpp
index 9dadce018c..3cb29d2ad1 100644
--- a/plugins/Import/src/patterns.cpp
+++ b/plugins/Import/src/patterns.cpp
@@ -567,7 +567,7 @@ public:
dbei->timestamp = RLInteger(&pMsg[0x12]);
dbei->timestamp -= TimeZone_ToLocal(dbei->timestamp) - dbei->timestamp; // deduct time zone offset from timestamp
dbei->cbBlob = RLWord(&pMsg[m_iMsgHeaderSize - 2]);
- dbei->pBlob = (uint8_t*)mir_alloc(dbei->cbBlob + 1);
+ dbei->pBlob = (char *)mir_alloc(dbei->cbBlob + 1);
memcpy(dbei->pBlob, pMsg + m_iMsgHeaderSize, dbei->cbBlob);
if (m_iFileVersion != 1)
for (int i = 0; i < dbei->cbBlob; i++) {
diff --git a/plugins/Import/src/textjson.cpp b/plugins/Import/src/textjson.cpp
index 39b2768787..db0adcd73d 100644
--- a/plugins/Import/src/textjson.cpp
+++ b/plugins/Import/src/textjson.cpp
@@ -190,7 +190,7 @@ public:
dbei->flags |= DBEF_UTF;
dbei->cbBlob = (uint32_t)szBody.size() + offset;
- dbei->pBlob = (uint8_t*)mir_calloc(dbei->cbBlob + 1);
+ dbei->pBlob = (char *)mir_calloc(dbei->cbBlob + 1);
memcpy(dbei->pBlob + offset, szBody.c_str(), szBody.size());
dbei->pBlob[dbei->cbBlob] = 0;
}