Commit Graph

1634 Commits

Author SHA1 Message Date
iphydf 54ec162558 Fix formatting in some C files.
Also replace &(x) with &x for consistency.
2018-01-10 18:57:37 +00:00
iphydf 79d8a22b48 Call freeaddrinfo on error paths in net_getipport.
Without these, we'll have a memory leak on error paths.
2018-01-10 18:57:17 +00:00
iphydf d6047692a5 Bump toxcore version to 0.2.0.
We're not releasing yet, but projects preparing for the release will want
to build against this version in master.
2018-01-08 19:36:00 +00:00
iphydf c09c3b6078 Add support for building the monolith test on android. 2018-01-06 23:37:51 +00:00
iphydf 2c8fb05f6e Remove deprecated ToxDNS
Based on #331.

Fixes #42.
2017-12-29 00:32:18 +00:00
Robin Lindén fc0cc08b21 Release v0.1.11 2017-12-26 17:46:13 +01:00
Yuri a3a22ae67e Fixed the bug when receipts for messages sent from the receipt callback never arrived. 2017-12-17 19:14:38 +01:00
zugz 0fce3fc94c forget DHT pubkey of offline friend after DHT timeout 2017-11-20 22:45:12 +01:00
yangfl 2651193b99 Fix typo 2017-11-19 23:52:23 +01:00
Diadlo d037f93811 Fix IPv4 and IPv6 loopbacks 2017-11-15 15:21:39 +03:00
zugz bb5f8a1710 set onion pingid timeout to announce timeout (300s) 2017-10-28 14:26:23 +02:00
Diadlo 1577c75c29 Add log info message, when someone found client with LAN discovery 2017-10-04 08:55:35 +03:00
Diadlo acb6b2d854 Improve LAN discovery
Issue: If another tox instance started on the not default port, LAN
discovery will be failed.

Now tox will iterate though all possible ports to find another tox
instances.
2017-10-04 00:16:35 +03:00
zugz 9e43d678fb reset hole-punching parameters after not punching for a while 2017-09-17 20:27:37 +02:00
Diadlo 020e77fbdf Remove 'in_addr' and 'addrinfo' mention from network.h 2017-08-27 16:02:58 +03:00
Diadlo f084f2c621 Add loopback and broadcast constants 2017-08-24 21:09:40 +03:00
Diadlo 491d03c229 Remove useless 'to_net_family' and 'to_host_family' 2017-08-24 20:09:08 +03:00
Diadlo e28d48130f Add platform independent constants 2017-08-24 20:09:08 +03:00
Diadlo 66b8a7685e AF_INET -> TOX_AF_INET 2017-08-24 20:09:08 +03:00
Maxim Biro bd47ae56ef Fix compiler warning due to missing void 2017-08-22 04:10:45 -04:00
Maxim Biro 889d25f819 Define INADDR_LOOPBACK on systems not defining it 2017-08-22 04:10:45 -04:00
Maxim Biro e9e5f57a2c Disable MSG_NOSIGNAL on systems not supporting it 2017-08-22 04:10:45 -04:00
Robin Lindén 6295d28a1e Release v0.1.10 2017-08-06 12:22:48 +02:00
zugz 5dd255729a Save bandwidth by moderating onion pinging. 2017-08-05 15:06:44 +02:00
Robin Lindén a429ef4a28 Release v0.1.9 2017-06-06 22:50:57 +02:00
Maxim Biro be76379ddb Fix non-portable zeroing out of doubles 2017-06-06 13:39:41 -04:00
Maxim Biro a680d1fdfc Fix theoretical memory leaks 2017-06-05 16:58:39 -04:00
iphydf 1bbe446760 Document inverted mutex lock/unlock.
All other code in this file does lock/call/unlock, except this one
instance, so we should explain why.
2017-06-05 12:18:26 +00:00
Diadlo ced07d6700 Change way to iterate through assoc 2017-06-05 02:05:53 +03:00
Diadlo f9607bced5 Make work with assoc more generic 2017-06-05 02:05:34 +03:00
Diadlo 91e3eb0159 Improve formatting and syntax 2017-06-05 02:04:43 +03:00
Diadlo 6a69e07109 Cleanup punch_holes 2017-06-05 02:04:38 +03:00
Diadlo 3902fd3cee Add using id_equal 2017-06-05 02:04:32 +03:00
Diadlo 7864f8d0a2 Update crypto_size and check index 2017-06-05 02:04:30 +03:00
Diadlo d9503763b3 Extract 'update_client_data' to reduce code duplication 2017-06-05 02:02:45 +03:00
Diadlo ffcee69db9 Extract 'update_client_with_reset' function to reduce code duplication 2017-06-05 02:02:33 +03:00
Diadlo 0eaa44650f Extract 'update_client' function
To make 'client_or_ip_port_in_list' code easy to read
2017-06-05 02:02:31 +03:00
Diadlo 71260e38e8 Extract variables 2017-06-05 01:51:12 +03:00
Diadlo 69c71ddd23 Change return type to be the same as return value type
Return value of 'addto_list' function is 'used' counter, which is uint32_t.
It will be better to use the same return type.
2017-06-05 01:51:12 +03:00
Diadlo 6197494d6b Add using macros to improve code 2017-06-05 01:51:12 +03:00
Diadlo db7b422f0c Add 'index_of' functions
- Replace 'for' with long body
- Replace friend_number function on index_of_friend_pk
- Replace client_in_nodelist on index_of_node_pk
2017-06-05 01:51:12 +03:00
Diadlo b3174bb6c4 Extract SharedKey struct and use it as var instead of indexing 2017-06-05 01:51:11 +03:00
Diadlo c12ef22138 Add using C99 'for' syntax 2017-06-05 01:09:39 +03:00
iphydf 1e8fa85aad Add a monolith_test that includes all toxcore sources.
This requires that every symbol, even if static (file-scope), is unique.
The idea is that we can easily run "whole" program static analysis on
programs that include monolith.h ("whole" is in quotes, as we don't
include dependencies like libsodium in this static analysis).
2017-06-04 17:48:23 +00:00
zugz 2474f43087 check if already in close list in ping_node_from_getnodes_ok()
fix index bounds check in add_to_close() and is_pk_in_close_list()

add TODO to write test for bug which fixed by this commit
2017-04-29 18:28:28 +02:00
Robin Lindén f6db9333e2 Release v0.1.8 2017-04-27 20:20:19 +02:00
Maxim Biro c25e3d2d7c Revert "initial version of tox_loop"
This reverts commit 200ee1cace.
2017-04-22 15:31:25 -04:00
Maxim Biro c7f63737eb Revert "Implement tox_loop"
This reverts commit 5ff099763b.
2017-04-22 15:31:25 -04:00
Maxim Biro 5ed37e5438 Revert "Fix TokTok/c-toxcore#535"
This reverts commit 439f676d45.
2017-04-22 15:31:25 -04:00
Ansa89 439f676d45 Fix TokTok/c-toxcore#535 2017-04-16 10:49:56 +02:00