mirror of
https://github.com/TokTok/c-toxcore
synced 2026-08-28 22:58:40 +00:00
Merge pull request #429 from dparnell/pristine
Fixed m_sendmessage to return the ID of the message sent
This commit is contained in:
+5
-1
@@ -231,7 +231,11 @@ uint32_t m_sendmessage(int friendnumber, uint8_t *message, uint32_t length)
|
||||
uint32_t msgid = ++friendlist[friendnumber].message_id;
|
||||
if (msgid == 0)
|
||||
msgid = 1; /* otherwise, false error */
|
||||
return m_sendmessage_withid(friendnumber, msgid, message, length);
|
||||
if(m_sendmessage_withid(friendnumber, msgid, message, length)) {
|
||||
return msgid;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32_t m_sendmessage_withid(int friendnumber, uint32_t theid, uint8_t *message, uint32_t length)
|
||||
|
||||
Reference in New Issue
Block a user