diff options
author | irungentoo <irungentoo@gmail.com> | 2015-02-27 21:18:43 -0500 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2015-02-27 21:18:43 -0500 |
commit | 8e59a826cb326e1c2cfefb775d9e0762c6ffe79b (patch) | |
tree | 0a37b33b13085131906669f8ff5c1bf4131e3b6c /toxcore | |
parent | d015879cd3d24ddc8f81964b64d0ce199cd75913 (diff) |
Removed backwards compatibility code from core.
That function should be static.
Diffstat (limited to 'toxcore')
-rw-r--r-- | toxcore/Messenger.c | 7 | ||||
-rw-r--r-- | toxcore/Messenger.h | 8 |
2 files changed, 1 insertions, 14 deletions
diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c index aa7b05bc..17cfd182 100644 --- a/toxcore/Messenger.c +++ b/toxcore/Messenger.c | |||
@@ -1002,7 +1002,7 @@ void callback_file_data(Messenger *m, void (*function)(Messenger *m, uint32_t, u | |||
1002 | * return 1 on success | 1002 | * return 1 on success |
1003 | * return 0 on failure | 1003 | * return 0 on failure |
1004 | */ | 1004 | */ |
1005 | int file_sendrequest(const Messenger *m, int32_t friendnumber, uint8_t filenumber, uint64_t filesize, | 1005 | static int file_sendrequest(const Messenger *m, int32_t friendnumber, uint8_t filenumber, uint64_t filesize, |
1006 | const uint8_t *filename, uint16_t filename_length) | 1006 | const uint8_t *filename, uint16_t filename_length) |
1007 | { | 1007 | { |
1008 | if (friend_not_valid(m, friendnumber)) | 1008 | if (friend_not_valid(m, friendnumber)) |
@@ -1612,11 +1612,6 @@ static int handle_packet(void *object, int i, uint8_t *temp, uint16_t len) | |||
1612 | if (packet_id == PACKET_ID_ONLINE && len == 1) { | 1612 | if (packet_id == PACKET_ID_ONLINE && len == 1) { |
1613 | set_friend_status(m, i, FRIEND_ONLINE); | 1613 | set_friend_status(m, i, FRIEND_ONLINE); |
1614 | send_online_packet(m, i); | 1614 | send_online_packet(m, i); |
1615 | } else if (packet_id == PACKET_ID_NICKNAME || packet_id == PACKET_ID_STATUSMESSAGE | ||
1616 | || packet_id == PACKET_ID_USERSTATUS) { | ||
1617 | /* Some backward compatibility, TODO: remove. */ | ||
1618 | set_friend_status(m, i, FRIEND_ONLINE); | ||
1619 | send_online_packet(m, i); | ||
1620 | } else { | 1615 | } else { |
1621 | return -1; | 1616 | return -1; |
1622 | } | 1617 | } |
diff --git a/toxcore/Messenger.h b/toxcore/Messenger.h index f4046f2e..4aeb780e 100644 --- a/toxcore/Messenger.h +++ b/toxcore/Messenger.h | |||
@@ -577,14 +577,6 @@ void callback_file_data(Messenger *m, void (*function)(Messenger *m, uint32_t, u | |||
577 | 577 | ||
578 | /* Send a file send request. | 578 | /* Send a file send request. |
579 | * Maximum filename length is 255 bytes. | 579 | * Maximum filename length is 255 bytes. |
580 | * return 1 on success | ||
581 | * return 0 on failure | ||
582 | */ | ||
583 | int file_sendrequest(const Messenger *m, int32_t friendnumber, uint8_t filenumber, uint64_t filesize, | ||
584 | const uint8_t *filename, uint16_t filename_length); | ||
585 | |||
586 | /* Send a file send request. | ||
587 | * Maximum filename length is 255 bytes. | ||
588 | * return file number on success | 580 | * return file number on success |
589 | * return -1 on failure | 581 | * return -1 on failure |
590 | */ | 582 | */ |