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 /protocols/JabberG | |
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 'protocols/JabberG')
-rw-r--r-- | protocols/JabberG/src/jabber_archive.cpp | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_misc.cpp | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_omemo.cpp | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_thread.cpp | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/protocols/JabberG/src/jabber_archive.cpp b/protocols/JabberG/src/jabber_archive.cpp index b60f98ac97..976fb536c5 100644 --- a/protocols/JabberG/src/jabber_archive.cpp +++ b/protocols/JabberG/src/jabber_archive.cpp @@ -125,7 +125,7 @@ void CJabberProto::OnIqResultGetCollection(const TiXmlElement *iqNode, CJabberIq dbei.szModule = m_szModuleName;
dbei.cbBlob = (uint32_t)mir_strlen(tszBody) + 1;
dbei.flags = DBEF_READ + DBEF_UTF + from;
- dbei.pBlob = (uint8_t*)tszBody;
+ dbei.pBlob = (char *)tszBody;
dbei.timestamp = tmStart + atol(tszSecs);
if (!DB::IsDuplicateEvent(hContact, dbei))
db_event_add(hContact, &dbei);
diff --git a/protocols/JabberG/src/jabber_misc.cpp b/protocols/JabberG/src/jabber_misc.cpp index 68f83280bf..d1f4992125 100644 --- a/protocols/JabberG/src/jabber_misc.cpp +++ b/protocols/JabberG/src/jabber_misc.cpp @@ -122,7 +122,7 @@ bool CJabberProto::AddDbPresenceEvent(MCONTACT hContact, uint8_t btEventType) }
DBEVENTINFO dbei = {};
- dbei.pBlob = &btEventType;
+ dbei.pBlob = (char *)&btEventType;
dbei.cbBlob = sizeof(btEventType);
dbei.eventType = EVENTTYPE_JABBER_PRESENCE;
dbei.flags = DBEF_READ;
diff --git a/protocols/JabberG/src/jabber_omemo.cpp b/protocols/JabberG/src/jabber_omemo.cpp index d1f921f9b4..d2498a3da7 100644 --- a/protocols/JabberG/src/jabber_omemo.cpp +++ b/protocols/JabberG/src/jabber_omemo.cpp @@ -1373,7 +1373,7 @@ bool CJabberProto::OmemoHandleMessage(const TiXmlElement *node, const char *jid, std::string text = root.write();
dbei.cbBlob = (int)text.size() + 1;
- dbei.pBlob = (uint8_t *)text.c_str();
+ dbei.pBlob = (char *)text.c_str();
db_event_add(hContact, &dbei);
}
else {
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp index 2efe644ed3..cc5f6d887b 100644 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -1245,7 +1245,7 @@ void CJabberProto::OnProcessMessage(const TiXmlElement *node, ThreadData *info) // chatstates gone event
if (hContact && XmlGetChildByTag(node, "gone", "xmlns", JABBER_FEAT_CHATSTATES) && m_bLogChatstates) {
- uint8_t bEventType = JABBER_DB_EVENT_CHATSTATES_GONE; // gone event
+ char bEventType = JABBER_DB_EVENT_CHATSTATES_GONE; // gone event
DBEVENTINFO dbei = {};
dbei.pBlob = &bEventType;
dbei.cbBlob = 1;
|