diff options
author | irungentoo <irungentoo@gmail.com> | 2013-08-11 06:59:26 -0700 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2013-08-11 06:59:26 -0700 |
commit | 3a2d453165ea99deb1898992cfb9a7fa2913ec13 (patch) | |
tree | 52bd093167193229875e405bdfbbb8a8e03625c2 /core | |
parent | 31bf4aece77e15993169b1fa3aa8654a16699f01 (diff) | |
parent | 6c0db66a01eb13c574712d8ae9abc9de2c64b7fe (diff) |
Merge pull request #429 from dparnell/pristine
Fixed m_sendmessage to return the ID of the message sent
Diffstat (limited to 'core')
-rw-r--r-- | core/Messenger.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/Messenger.c b/core/Messenger.c index d340f5f8..d26bba56 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 | ||
237 | uint32_t m_sendmessage_withid(int friendnumber, uint32_t theid, uint8_t *message, uint32_t length) | 241 | uint32_t m_sendmessage_withid(int friendnumber, uint32_t theid, uint8_t *message, uint32_t length) |