diff options
author | iphydf <iphydf@users.noreply.github.com> | 2016-08-17 10:52:04 +0100 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2016-08-18 00:01:53 +0100 |
commit | a5e35180c7b42d30c82825cd67c8118ce048f65a (patch) | |
tree | b74e8ece4f78a988ab0a1300cc08bd35fcd63662 /toxcore/onion.c | |
parent | db22522741cccdeba657776844538c71cf8e8e7a (diff) |
Make tox_callback_friend_name stateless.
See #27 and #40 for details.
Diffstat (limited to 'toxcore/onion.c')
-rw-r--r-- | toxcore/onion.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/toxcore/onion.c b/toxcore/onion.c index cec178b9..f0e3eed4 100644 --- a/toxcore/onion.c +++ b/toxcore/onion.c | |||
@@ -306,7 +306,7 @@ int send_onion_response(Networking_Core *net, IP_Port dest, const uint8_t *data, | |||
306 | return 0; | 306 | return 0; |
307 | } | 307 | } |
308 | 308 | ||
309 | static int handle_send_initial(void *object, IP_Port source, const uint8_t *packet, uint16_t length) | 309 | static int handle_send_initial(void *object, IP_Port source, const uint8_t *packet, uint16_t length, void *userdata) |
310 | { | 310 | { |
311 | Onion *onion = object; | 311 | Onion *onion = object; |
312 | 312 | ||
@@ -367,7 +367,7 @@ int onion_send_1(const Onion *onion, const uint8_t *plain, uint16_t len, IP_Port | |||
367 | return 0; | 367 | return 0; |
368 | } | 368 | } |
369 | 369 | ||
370 | static int handle_send_1(void *object, IP_Port source, const uint8_t *packet, uint16_t length) | 370 | static int handle_send_1(void *object, IP_Port source, const uint8_t *packet, uint16_t length, void *userdata) |
371 | { | 371 | { |
372 | Onion *onion = object; | 372 | Onion *onion = object; |
373 | 373 | ||
@@ -417,7 +417,7 @@ static int handle_send_1(void *object, IP_Port source, const uint8_t *packet, ui | |||
417 | return 0; | 417 | return 0; |
418 | } | 418 | } |
419 | 419 | ||
420 | static int handle_send_2(void *object, IP_Port source, const uint8_t *packet, uint16_t length) | 420 | static int handle_send_2(void *object, IP_Port source, const uint8_t *packet, uint16_t length, void *userdata) |
421 | { | 421 | { |
422 | Onion *onion = object; | 422 | Onion *onion = object; |
423 | 423 | ||
@@ -466,7 +466,7 @@ static int handle_send_2(void *object, IP_Port source, const uint8_t *packet, ui | |||
466 | } | 466 | } |
467 | 467 | ||
468 | 468 | ||
469 | static int handle_recv_3(void *object, IP_Port source, const uint8_t *packet, uint16_t length) | 469 | static int handle_recv_3(void *object, IP_Port source, const uint8_t *packet, uint16_t length, void *userdata) |
470 | { | 470 | { |
471 | Onion *onion = object; | 471 | Onion *onion = object; |
472 | 472 | ||
@@ -502,7 +502,7 @@ static int handle_recv_3(void *object, IP_Port source, const uint8_t *packet, ui | |||
502 | return 0; | 502 | return 0; |
503 | } | 503 | } |
504 | 504 | ||
505 | static int handle_recv_2(void *object, IP_Port source, const uint8_t *packet, uint16_t length) | 505 | static int handle_recv_2(void *object, IP_Port source, const uint8_t *packet, uint16_t length, void *userdata) |
506 | { | 506 | { |
507 | Onion *onion = object; | 507 | Onion *onion = object; |
508 | 508 | ||
@@ -538,7 +538,7 @@ static int handle_recv_2(void *object, IP_Port source, const uint8_t *packet, ui | |||
538 | return 0; | 538 | return 0; |
539 | } | 539 | } |
540 | 540 | ||
541 | static int handle_recv_1(void *object, IP_Port source, const uint8_t *packet, uint16_t length) | 541 | static int handle_recv_1(void *object, IP_Port source, const uint8_t *packet, uint16_t length, void *userdata) |
542 | { | 542 | { |
543 | Onion *onion = object; | 543 | Onion *onion = object; |
544 | 544 | ||