diff options
author | irungentoo <irungentoo@gmail.com> | 2014-01-19 09:44:33 -0500 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2014-01-19 09:44:33 -0500 |
commit | cdcb8b86007b6490557f1329f42c08732282c500 (patch) | |
tree | 8e41be5a50fd122ea557f11ec445c5fc234e91a6 /toxcore/Messenger.c | |
parent | 99ae23813b47cc5198a210c4ea8da54d8a817829 (diff) |
Added no_replay and added some things to the docs.
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 | ||