summaryrefslogtreecommitdiff
path: root/core/Messenger.c
diff options
context:
space:
mode:
authorDaniel Parnell <me@danielparnell.com>2013-08-11 22:15:07 +1000
committerDaniel Parnell <me@danielparnell.com>2013-08-11 22:15:07 +1000
commit6c0db66a01eb13c574712d8ae9abc9de2c64b7fe (patch)
tree6adfe1a1c65a3b1e6aabba545646fef52b7216d7 /core/Messenger.c
parente5e5ec6f57d2b61e585889185623f6acb303b55c (diff)
Fixed m_sendmessage to return the ID of the message sent
Diffstat (limited to 'core/Messenger.c')
-rw-r--r--core/Messenger.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/Messenger.c b/core/Messenger.c
index 37ab5e2d..8c88c305 100644
--- a/core/Messenger.c
+++ b/core/Messenger.c
@@ -231,7 +231,11 @@ uint32_t m_sendmessage(int friendnumber, uint8_t *message, uint32_t length)
231 uint32_t msgid = ++friendlist[friendnumber].message_id; 231 uint32_t msgid = ++friendlist[friendnumber].message_id;
232 if (msgid == 0) 232 if (msgid == 0)
233 msgid = 1; /* otherwise, false error */ 233 msgid = 1; /* otherwise, false error */
234 return m_sendmessage_withid(friendnumber, msgid, message, length); 234 if(m_sendmessage_withid(friendnumber, msgid, message, length)) {
235 return msgid;
236 }
237
238 return 0;
235} 239}
236 240
237uint32_t m_sendmessage_withid(int friendnumber, uint32_t theid, uint8_t *message, uint32_t length) 241uint32_t m_sendmessage_withid(int friendnumber, uint32_t theid, uint8_t *message, uint32_t length)