mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Fixed m_sendmessage to return the ID of the message sent
This commit is contained in:
parent
e5e5ec6f57
commit
6c0db66a01
|
@ -231,7 +231,11 @@ uint32_t m_sendmessage(int friendnumber, uint8_t *message, uint32_t length)
|
||||||
uint32_t msgid = ++friendlist[friendnumber].message_id;
|
uint32_t msgid = ++friendlist[friendnumber].message_id;
|
||||||
if (msgid == 0)
|
if (msgid == 0)
|
||||||
msgid = 1; /* otherwise, false error */
|
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)
|
uint32_t m_sendmessage_withid(int friendnumber, uint32_t theid, uint8_t *message, uint32_t length)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user