From 8a56cb3b5814d8152613fefb74a11bb28dc70f7a Mon Sep 17 00:00:00 2001 From: Will Rouesnel Date: Tue, 9 Dec 2014 03:32:31 +1100 Subject: Change prototype for custom_packet_handler functions Change the custom_packet_handler callback function interface to be consistent with other callback interfaces. The new interface takes the Messenger object calling as the first parameter, and moves the user data object to be the last parameter. This makes it comparable to the callbacks for file transfer and the like, and should simplify building interfaces. The new prototype is: int (*)(Messenger *m, int32_t friendnumber, const uint8_t *data, uint32_t len, void *object) --- toxav/rtp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toxav/rtp.c') diff --git a/toxav/rtp.c b/toxav/rtp.c index 6eb61a81..3696fd0a 100644 --- a/toxav/rtp.c +++ b/toxav/rtp.c @@ -341,7 +341,7 @@ RTPMessage *msg_parse ( const uint8_t *data, int length ) /** * Callback for networking core. */ -int rtp_handle_packet ( void *object, const uint8_t *data, uint32_t length ) +int rtp_handle_packet ( Messenger* m, int32_t friendnumber, const uint8_t *data, uint32_t length, void *object ) { RTPSession *session = object; RTPMessage *msg; -- cgit v1.2.3