diff options
author | charmlesscoin <charmlesscoin@gmail.com> | 2013-08-06 20:58:42 -0400 |
---|---|---|
committer | charmlesscoin <charmlesscoin@gmail.com> | 2013-08-06 20:58:42 -0400 |
commit | c644ccd28782e9d74f5962a97a0973551fb7afe2 (patch) | |
tree | 42f892aea55a6394d5d6ff0dbace2214675cbd71 /core/util.c | |
parent | 95a3f69580749b8fcabf92cc2ace757d61fa34de (diff) | |
parent | d04f2d0e51931db5fbd8c672c44bb1e59fc58b79 (diff) |
Merge branch 'master' of git://github.com/irungentoo/ProjectTox-Core
Diffstat (limited to 'core/util.c')
-rw-r--r-- | core/util.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/core/util.c b/core/util.c index 4ce9271e..d201bcb4 100644 --- a/core/util.c +++ b/core/util.c | |||
@@ -9,7 +9,8 @@ | |||
9 | #include <stdint.h> | 9 | #include <stdint.h> |
10 | #include <stdbool.h> | 10 | #include <stdbool.h> |
11 | 11 | ||
12 | #include "network.h" | 12 | #include "DHT.h" |
13 | #include "packets.h" | ||
13 | 14 | ||
14 | uint64_t now() | 15 | uint64_t now() |
15 | { | 16 | { |
@@ -32,3 +33,13 @@ bool ipp_eq(IP_Port a, IP_Port b) | |||
32 | { | 33 | { |
33 | return (a.ip.i == b.ip.i) && (a.port == b.port); | 34 | return (a.ip.i == b.ip.i) && (a.port == b.port); |
34 | } | 35 | } |
36 | |||
37 | bool id_eq(clientid_t* dest, clientid_t* src) | ||
38 | { | ||
39 | return memcmp(dest, src, sizeof(clientid_t)) == 0; | ||
40 | } | ||
41 | |||
42 | void id_cpy(clientid_t* dest, clientid_t* src) | ||
43 | { | ||
44 | memcpy(dest, src, sizeof(clientid_t)); | ||
45 | } | ||