diff options
author | Diadlo <polsha3@gmail.com> | 2017-03-03 21:21:25 +0300 |
---|---|---|
committer | Diadlo <polsha3@gmail.com> | 2017-08-24 20:09:08 +0300 |
commit | 491d03c229d5fe684a38bac2abc4ef2617da2bba (patch) | |
tree | b86c8e7ea5bfca3738e94858ce696d39752d6009 /toxcore/DHT.c | |
parent | e28d48130f69b3447d35287492f95a2f0a83b1ff (diff) |
Remove useless 'to_net_family' and 'to_host_family'
Diffstat (limited to 'toxcore/DHT.c')
-rw-r--r-- | toxcore/DHT.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/toxcore/DHT.c b/toxcore/DHT.c index eb1e1a5e..a4b97fb8 100644 --- a/toxcore/DHT.c +++ b/toxcore/DHT.c | |||
@@ -256,30 +256,6 @@ int handle_request(const uint8_t *self_public_key, const uint8_t *self_secret_ke | |||
256 | return len1; | 256 | return len1; |
257 | } | 257 | } |
258 | 258 | ||
259 | void to_net_family(IP *ip) | ||
260 | { | ||
261 | if (ip->family == TOX_AF_INET) { | ||
262 | ip->family = TOX_AF_INET; | ||
263 | } else if (ip->family == TOX_AF_INET6) { | ||
264 | ip->family = TOX_AF_INET6; | ||
265 | } | ||
266 | } | ||
267 | |||
268 | int to_host_family(IP *ip) | ||
269 | { | ||
270 | if (ip->family == TOX_AF_INET) { | ||
271 | ip->family = TOX_AF_INET; | ||
272 | return 0; | ||
273 | } | ||
274 | |||
275 | if (ip->family == TOX_AF_INET6) { | ||
276 | ip->family = TOX_AF_INET6; | ||
277 | return 0; | ||
278 | } | ||
279 | |||
280 | return -1; | ||
281 | } | ||
282 | |||
283 | #define PACKED_NODE_SIZE_IP4 (1 + SIZE_IP4 + sizeof(uint16_t) + CRYPTO_PUBLIC_KEY_SIZE) | 259 | #define PACKED_NODE_SIZE_IP4 (1 + SIZE_IP4 + sizeof(uint16_t) + CRYPTO_PUBLIC_KEY_SIZE) |
284 | #define PACKED_NODE_SIZE_IP6 (1 + SIZE_IP6 + sizeof(uint16_t) + CRYPTO_PUBLIC_KEY_SIZE) | 260 | #define PACKED_NODE_SIZE_IP6 (1 + SIZE_IP6 + sizeof(uint16_t) + CRYPTO_PUBLIC_KEY_SIZE) |
285 | 261 | ||