diff options
Diffstat (limited to 'testing/Messenger_test.c')
-rw-r--r-- | testing/Messenger_test.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/testing/Messenger_test.c b/testing/Messenger_test.c index 51542c6d..fa5d6890 100644 --- a/testing/Messenger_test.c +++ b/testing/Messenger_test.c | |||
@@ -55,7 +55,7 @@ | |||
55 | * networking_requesthandler and so cannot take a Messenger * */ | 55 | * networking_requesthandler and so cannot take a Messenger * */ |
56 | static Messenger *m; | 56 | static Messenger *m; |
57 | 57 | ||
58 | void print_request(uint8_t * public_key, uint8_t * data, uint16_t length) | 58 | void print_request(uint8_t * public_key, uint8_t * data, uint16_t length, void* userdata) |
59 | { | 59 | { |
60 | printf("Friend request received from: \n"); | 60 | printf("Friend request received from: \n"); |
61 | printf("ClientID: "); | 61 | printf("ClientID: "); |
@@ -80,7 +80,7 @@ void print_request(uint8_t * public_key, uint8_t * data, uint16_t length) | |||
80 | } | 80 | } |
81 | } | 81 | } |
82 | 82 | ||
83 | void print_message(Messenger *m, int friendnumber, uint8_t * string, uint16_t length) | 83 | void print_message(Messenger *m, int friendnumber, uint8_t * string, uint16_t length, void* userdata) |
84 | { | 84 | { |
85 | printf("Message with length %u received from %u: %s \n", length, friendnumber, string); | 85 | printf("Message with length %u received from %u: %s \n", length, friendnumber, string); |
86 | m_sendmessage(m, friendnumber, (uint8_t*)"Test1", 6); | 86 | m_sendmessage(m, friendnumber, (uint8_t*)"Test1", 6); |
@@ -114,8 +114,8 @@ int main(int argc, char *argv[]) | |||
114 | fclose(file); | 114 | fclose(file); |
115 | 115 | ||
116 | } | 116 | } |
117 | m_callback_friendrequest(m, print_request); | 117 | m_callback_friendrequest(m, print_request, NULL); |
118 | m_callback_friendmessage(m, print_message); | 118 | m_callback_friendmessage(m, print_message, NULL); |
119 | 119 | ||
120 | printf("OUR ID: "); | 120 | printf("OUR ID: "); |
121 | uint32_t i; | 121 | uint32_t i; |