summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/Messenger.c9
-rw-r--r--core/Messenger.h5
2 files changed, 14 insertions, 0 deletions
diff --git a/core/Messenger.c b/core/Messenger.c
index 4c76dd30..3a287363 100644
--- a/core/Messenger.c
+++ b/core/Messenger.c
@@ -240,6 +240,15 @@ int setname(uint8_t * name, uint16_t length)
240 return 0; 240 return 0;
241} 241}
242 242
243/* get our nickname
244 put it in name
245 return the length of the name */
246uint16_t getself_name(uint8_t *name)
247{
248 memcpy(name, self_name, self_name_length);
249 return self_name_length;
250}
251
243/* get name of friendnumber 252/* get name of friendnumber
244 put it in name 253 put it in name
245 name needs to be a valid memory location with a size of at least MAX_NAME_LENGTH bytes. 254 name needs to be a valid memory location with a size of at least MAX_NAME_LENGTH bytes.
diff --git a/core/Messenger.h b/core/Messenger.h
index 7263901c..6ab50175 100644
--- a/core/Messenger.h
+++ b/core/Messenger.h
@@ -92,6 +92,11 @@ int m_sendmessage(int friendnumber, uint8_t *message, uint32_t length);
92 return -1 if failure */ 92 return -1 if failure */
93int setname(uint8_t *name, uint16_t length); 93int setname(uint8_t *name, uint16_t length);
94 94
95/* get our nickname
96 put it in name
97 return the length of the name*/
98uint16_t getself_name(uint8_t *name);
99
95/* get name of friendnumber 100/* get name of friendnumber
96 put it in name 101 put it in name
97 name needs to be a valid memory location with a size of at least MAX_NAME_LENGTH (128) bytes. 102 name needs to be a valid memory location with a size of at least MAX_NAME_LENGTH (128) bytes.