summaryrefslogtreecommitdiff
path: root/toxcore
diff options
context:
space:
mode:
authormannol <eniz_vukovic@hotmail.com>2014-02-23 23:24:07 +0100
committermannol <eniz_vukovic@hotmail.com>2014-02-23 23:24:07 +0100
commitcf8a090cdeeb2630730203144001f1357b25ee01 (patch)
treeac52dcc5d043248cd719004d4eaffde64a65e3d3 /toxcore
parent4888d916d037e371c88d39951f24f6ef4219c7cc (diff)
parentf219fb4ac1bf60eea3117df4aa8615cd07738a69 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'toxcore')
-rw-r--r--toxcore/network.h2
-rw-r--r--toxcore/tox.c10
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 */
388void tox_callback_user_status(Tox *tox, void (*_function)(Tox *tox, int, TOX_USERSTATUS, void *), void *userdata) 388void 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 */
399void tox_callback_typing_change(Tox *tox, void (*function)(Tox *tox, int, int, void *), void *userdata) 397void 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.