diff options
Diffstat (limited to 'toxcore/Messenger.c')
-rw-r--r-- | toxcore/Messenger.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c index 2f270fb6..19246d7d 100644 --- a/toxcore/Messenger.c +++ b/toxcore/Messenger.c | |||
@@ -34,27 +34,6 @@ | |||
34 | #define MIN(a,b) (((a)<(b))?(a):(b)) | 34 | #define MIN(a,b) (((a)<(b))?(a):(b)) |
35 | 35 | ||
36 | 36 | ||
37 | void host_to_net(uint8_t *num, uint16_t numbytes) | ||
38 | { | ||
39 | union { | ||
40 | uint32_t i; | ||
41 | uint8_t c[4]; | ||
42 | } a; | ||
43 | a.i = 1; | ||
44 | |||
45 | if (a.c[0] == 1) { | ||
46 | uint32_t i; | ||
47 | uint8_t buff[numbytes]; | ||
48 | |||
49 | for (i = 0; i < numbytes; ++i) { | ||
50 | buff[i] = num[numbytes - i - 1]; | ||
51 | } | ||
52 | |||
53 | memcpy(num, buff, numbytes); | ||
54 | } | ||
55 | } | ||
56 | #define net_to_host(x, y) host_to_net(x, y) | ||
57 | |||
58 | static void set_friend_status(Messenger *m, int friendnumber, uint8_t status); | 37 | static void set_friend_status(Messenger *m, int friendnumber, uint8_t status); |
59 | static int write_cryptpacket_id(Messenger *m, int friendnumber, uint8_t packet_id, uint8_t *data, uint32_t length); | 38 | static int write_cryptpacket_id(Messenger *m, int friendnumber, uint8_t packet_id, uint8_t *data, uint32_t length); |
60 | 39 | ||