mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Merge pull request #429 from dparnell/pristine
Fixed m_sendmessage to return the ID of the message sent
This commit is contained in:
commit
3a2d453165
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user