From adf1f2e587159bb99d820faa983ef3e357d41f40 Mon Sep 17 00:00:00 2001 From: aunsane Date: Wed, 18 Jul 2018 00:17:16 +0300 Subject: Tox: updated libtox to v0.2.3 --- protocols/Tox/libtox/src/toxcore/onion.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'protocols/Tox/libtox/src/toxcore/onion.h') diff --git a/protocols/Tox/libtox/src/toxcore/onion.h b/protocols/Tox/libtox/src/toxcore/onion.h index e81b3a52ae..0e025a1ceb 100644 --- a/protocols/Tox/libtox/src/toxcore/onion.h +++ b/protocols/Tox/libtox/src/toxcore/onion.h @@ -26,7 +26,9 @@ #include "DHT.h" -typedef struct { +typedef int onion_recv_1_cb(void *object, IP_Port dest, const uint8_t *data, uint16_t length); + +typedef struct Onion { DHT *dht; Networking_Core *net; uint8_t secret_symmetric_key[CRYPTO_SYMMETRIC_KEY_SIZE]; @@ -36,7 +38,7 @@ typedef struct { Shared_Keys shared_keys_2; Shared_Keys shared_keys_3; - int (*recv_1_function)(void *, IP_Port, const uint8_t *, uint16_t); + onion_recv_1_cb *recv_1_function; void *callback_object; } Onion; @@ -56,7 +58,7 @@ typedef struct { #define ONION_PATH_LENGTH 3 -typedef struct { +typedef struct Onion_Path { uint8_t shared_key1[CRYPTO_SHARED_KEY_SIZE]; uint8_t shared_key2[CRYPTO_SHARED_KEY_SIZE]; uint8_t shared_key3[CRYPTO_SHARED_KEY_SIZE]; @@ -154,8 +156,7 @@ int onion_send_1(const Onion *onion, const uint8_t *plain, uint16_t len, IP_Port * * Format: function(void *object, IP_Port dest, uint8_t *data, uint16_t length) */ -void set_callback_handle_recv_1(Onion *onion, int (*function)(void *, IP_Port, const uint8_t *, uint16_t), - void *object); +void set_callback_handle_recv_1(Onion *onion, onion_recv_1_cb *function, void *object); Onion *new_onion(DHT *dht); -- cgit v1.2.3