diff options
author | irungentoo <irungentoo@gmail.com> | 2013-07-27 21:08:06 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2013-07-27 21:08:06 -0400 |
commit | deb124f5393f8938709ac0bd5ab00082e5cb3723 (patch) | |
tree | 9d2878735b88ef91e637029188249f845735a9c9 /core/Messenger.h | |
parent | b83359cd0594fae7789697b1d71a5aeb4c09a1fa (diff) |
Fixed name related functions.
They now should give proper lengths and take length into account when
sending.
Diffstat (limited to 'core/Messenger.h')
-rw-r--r-- | core/Messenger.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/Messenger.h b/core/Messenger.h index 564e29f2..7263901c 100644 --- a/core/Messenger.h +++ b/core/Messenger.h | |||
@@ -85,9 +85,11 @@ int m_friendstatus(int friendnumber); | |||
85 | int m_sendmessage(int friendnumber, uint8_t *message, uint32_t length); | 85 | int m_sendmessage(int friendnumber, uint8_t *message, uint32_t length); |
86 | 86 | ||
87 | /* Set our nickname | 87 | /* Set our nickname |
88 | name must be a string of maximum MAX_NAME_LENGTH length. | 88 | name must be a string of maximum MAX_NAME_LENGTH length. |
89 | return 0 if success | 89 | length must be at least 1 byte |
90 | return -1 if failure */ | 90 | length is the length of name with the NULL terminator |
91 | return 0 if success | ||
92 | return -1 if failure */ | ||
91 | int setname(uint8_t *name, uint16_t length); | 93 | int setname(uint8_t *name, uint16_t length); |
92 | 94 | ||
93 | /* get name of friendnumber | 95 | /* get name of friendnumber |