summaryrefslogtreecommitdiff
path: root/testing/Messenger_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'testing/Messenger_test.c')
-rw-r--r--testing/Messenger_test.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/testing/Messenger_test.c b/testing/Messenger_test.c
index 7b94364a..619d94b1 100644
--- a/testing/Messenger_test.c
+++ b/testing/Messenger_test.c
@@ -56,6 +56,12 @@
56 56
57#endif 57#endif
58 58
59void print_message(Messenger *m, int friendnumber, uint8_t *string, uint16_t length, void *userdata)
60{
61 printf("Message with length %u received from %u: %s \n", length, friendnumber, string);
62 m_sendmessage(m, friendnumber, (uint8_t *)"Test1", 6);
63}
64
59/* FIXME needed as print_request has to match the interface expected by 65/* FIXME needed as print_request has to match the interface expected by
60 * networking_requesthandler and so cannot take a Messenger * */ 66 * networking_requesthandler and so cannot take a Messenger * */
61static Messenger *m; 67static Messenger *m;
@@ -87,12 +93,6 @@ void print_request(uint8_t *public_key, uint8_t *data, uint16_t length, void *us
87 } 93 }
88} 94}
89 95
90void print_message(Messenger *m, int friendnumber, uint8_t *string, uint16_t length, void *userdata)
91{
92 printf("Message with length %u received from %u: %s \n", length, friendnumber, string);
93 m_sendmessage(m, friendnumber, (uint8_t *)"Test1", 6);
94}
95
96int main(int argc, char *argv[]) 96int main(int argc, char *argv[])
97{ 97{
98 /* let user override default by cmdline */ 98 /* let user override default by cmdline */