summaryrefslogtreecommitdiff
path: root/testing/Messenger_test.c
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2013-09-27 09:02:19 -0700
committerirungentoo <irungentoo@gmail.com>2013-09-27 09:02:19 -0700
commitc7c72b0756e3bf4fcc3e346c34849d801be5c5fd (patch)
tree07fcf0108fe1813db5d386974eedb9fac5c67d62 /testing/Messenger_test.c
parentbeff2b6de659a708ed366a9ae925eab8c4ca0ddd (diff)
parent6fe25e4f6f49d1f19bdcc5ce89a587c29757b266 (diff)
Merge pull request #606 from FullName/Permit.Wshadow
Permit -Wshadow as useful warning.
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 */