diff options
Diffstat (limited to 'toxcore')
-rw-r--r-- | toxcore/network.h | 2 | ||||
-rw-r--r-- | toxcore/tox.c | 10 |
2 files changed, 4 insertions, 8 deletions
diff --git a/toxcore/network.h b/toxcore/network.h index aaf89f19..b0d306e4 100644 --- a/toxcore/network.h +++ b/toxcore/network.h | |||
@@ -149,7 +149,7 @@ typedef int sock_t; | |||
149 | #define NET_PACKET_ONION_RECV_2 141 | 149 | #define NET_PACKET_ONION_RECV_2 141 |
150 | #define NET_PACKET_ONION_RECV_1 142 | 150 | #define NET_PACKET_ONION_RECV_1 142 |
151 | 151 | ||
152 | /* Only used for bootstrap servers */ | 152 | /* Only used for bootstrap nodes */ |
153 | #define BOOTSTRAP_INFO_PACKET_ID 240 | 153 | #define BOOTSTRAP_INFO_PACKET_ID 240 |
154 | 154 | ||
155 | 155 | ||
diff --git a/toxcore/tox.c b/toxcore/tox.c index bdef1eaa..0115e827 100644 --- a/toxcore/tox.c +++ b/toxcore/tox.c | |||
@@ -385,23 +385,19 @@ void tox_callback_status_message(Tox *tox, void (*function)(Messenger *tox, int, | |||
385 | /* Set the callback for status type changes. | 385 | /* Set the callback for status type changes. |
386 | * function(int friendnumber, USERSTATUS kind) | 386 | * function(int friendnumber, USERSTATUS kind) |
387 | */ | 387 | */ |
388 | void tox_callback_user_status(Tox *tox, void (*_function)(Tox *tox, int, TOX_USERSTATUS, void *), void *userdata) | 388 | void tox_callback_user_status(Tox *tox, void (*function)(Messenger *tox, int, TOX_USERSTATUS, void *), void *userdata) |
389 | { | 389 | { |
390 | Messenger *m = tox; | 390 | Messenger *m = tox; |
391 | typedef void (*function_type)(Messenger *, int, USERSTATUS, void *); | ||
392 | function_type function = (function_type)_function; | ||
393 | m_callback_userstatus(m, function, userdata); | 391 | m_callback_userstatus(m, function, userdata); |
394 | } | 392 | } |
395 | 393 | ||
396 | /* Set the callback for typing changes. | 394 | /* Set the callback for typing changes. |
397 | * function (int friendnumber, int is_typing) | 395 | * function (int friendnumber, int is_typing) |
398 | */ | 396 | */ |
399 | void tox_callback_typing_change(Tox *tox, void (*function)(Tox *tox, int, int, void *), void *userdata) | 397 | void tox_callback_typing_change(Tox *tox, void (*function)(Messenger *tox, int, int, void *), void *userdata) |
400 | { | 398 | { |
401 | Messenger *m = tox; | 399 | Messenger *m = tox; |
402 | typedef void (*function_type)(Messenger *, int, int, void *); | 400 | m_callback_typingchange(m, function, userdata); |
403 | function_type function_new = (function_type)function; | ||
404 | m_callback_typingchange(m, function_new, userdata); | ||
405 | } | 401 | } |
406 | 402 | ||
407 | /* Set the callback for read receipts. | 403 | /* Set the callback for read receipts. |