summaryrefslogtreecommitdiff
path: root/toxcore
AgeCommit message (Collapse)Author
2018-10-07Release 0.2.8Robin Lindén
2018-10-07Make sure logger levels stay in sync across filesMaxim Biro
2018-10-07Fix memleak in tcp server by wiping priority queues on deletionzugz (tox)
2018-09-26Remove a function-like macro and replace it with a function.iphydf
No use making this a macro. LTO will inline this anyway, if we care about performance. Generally, we avoid function-like macros that can be functions.
2018-09-26Use new `@pthread` library from Bazel for Windows compat.iphydf
See https://github.com/TokTok/toktok-stack/pull/38.
2018-09-25Combine last_reported_announced with last_seen in Onion_Friendzugz (tox)
This resets friend search rate in two circumstances where it should be reset: * When the friend gets a dhtpk packet to us; * When a friend connection to the friend goes down.
2018-09-24Add Cirrus CI configuration.iphydf
This CI can run Bazel tests, because it supports IPv6. This is nice, because now we can run IPv6 tests on every PR.
2018-09-20Send rejoin packets on conference disconnectionzugz (tox)
We were mistakenly not making a rejoin attempt on freezing connections due to all closest connections going down. This fixes that, and tweaks the test. I've still only done tens rather than hundreds of tests, but I'm fairly confident that the conference test now consistently passes.
2018-09-19Fix typosyangfl
2018-09-16Fixed a silly boolean practice using uint8_thugbubby
2018-09-14Standardise header guards.iphydf
Using the full path including the repo name.
2018-09-14Use C++ style casts in C++ code.iphydf
2018-09-10Assert that we don't kill tox before killing toxav.iphydf
Possibly this is what's happening in #1149.
2018-09-08Fix typo: tcp_replays -> tcp_relays.iphydf
2018-09-07Add messenger state plugin system.iphydf
This is for modules like groups to hook into to have their own state management in the `tox_savedata` format.
2018-09-06Avoid recursion in `ip_is_lan` and `ip_is_local`.iphydf
2018-09-06Ignore "unused-result" warning in super_donators code.iphydf
2018-09-05Add mechanism for recovering from disconnections in conferenceszugz
* add freezing and unfreezing of peers * add rejoin packet * revise handling of temporary invited connections * rename "peer kill" packet to "peer leave" packet * test rejoining in conference test * use custom clock in conference test
2018-09-03Avoid use of global mutable state in mono_time on win32.iphydf
This uses a trick to get read-write access to `this` from a `const` member function, similar to C++ `mutable`, but uglier.
2018-08-30Remove the use of `CLOCK_MONOTONIC_RAW`.iphydf
The raw clock isn't subject to NTP adjustments. It may run less accurately than the regular monotonic clock. I see no reason why raw would be better for tox than the normal one. This avoids one piece of OS-specific ifdef'd code.
2018-08-30Clean up `add_to_list` function a bit.iphydf
Can't trivially get rid of recursion here, since it's a non-linear recursive function.
2018-08-30Release 0.2.7Robin Lindén
2018-08-27try ipv6 connections even after udp timeoutzugz (tox)
Also adds a test (auto_reconnect_test) which fails without this change.
2018-08-27Make `ip_is_lan` return bool instead of 0/-1.iphydf
This inverts the truthiness of the return value. Previously, 0 meant `true` and -1 meant `false`. Now, `true` (1) means `true` and `false` (0) means `false`.
2018-08-26Use `bool` in place of 0/1 int values.iphydf
2018-08-26Add support for setting a custom monotonic time function in mono_timezugz (tox)
2018-08-26Format crypto_core.c.iphydf
Changes: * 100 columns maximum (not strict, can be a bit more sometimes). * No space after cast.
2018-08-26Update copyright to 2018.iphydf
2018-08-26Fix test class name for mono_time_test.iphydf
Was: Util, should be: MonoTime.
2018-08-26Add some tests for `ping_array`.iphydf
No timeout test here yet, because we don't yet have the ability to manipulate time at will, so we would have to actually sleep.
2018-08-25Change while-loop to for-loop to express for-each-frame.iphydf
* Assignments can't be used as expressions, therefore `while` loops should not be used as a `for-each` construct. Use `for`, instead.
2018-08-25fix leave callback calling in del_groupchatzugz (tox)
2018-08-23Force storing the result of crypto_memcmp in the test.iphydf
So we don't accidentally elide the call given that it's a pure function and its result isn't used.
2018-08-21consistently use 'mono_time' rather than 'monotime'zugz (tox)
2018-08-19make Mono_Time an argument to current_time_monotoniczugz (tox)
2018-08-16Use per-instance `Mono_Time` for Messenger and onion.iphydf
2018-08-16Reduce the number of times `unix_time_update` is called.iphydf
Reduced by, e.g.: * `file_transfer_test`: 33% of the `clock_gettime` calls. * `tox_many_test`: 53% of the `clock_gettime` calls. Other tests will see similar improvements. Real world applications will be closer to 40-50% improvement, since tox_many_test has 100 nodes, while file_transfer_test has 2 nodes.
2018-08-16Release 0.2.6Robin Lindén
2018-08-13Avoid implicit conversion of negative value to uint32_t.iphydf
2018-08-13Avoid passing -1 as friend connection to new groups.iphydf
Somehow it still works because the lower levels can deal with inconsistent/broken state, but this lets us avoid that broken state in the first place. If a friend connection doesn't exist, we don't add it to our group.
2018-08-12Make `conferences_object` properly typed.iphydf
The void pointer here only adds opportunity to introduce bugs and doesn't actually make things more layered. It's just the code lying about being layered while it's actually spaghetti.
2018-08-12add callback for successful connection to a conferencezugz (tox)
2018-08-12Remove last use of the `MIN` macro.iphydf
We use functions for this instead.
2018-08-11Add deprecation notice to some UPPER_CASE enums.iphydf
The enumerators won't change, but the type name will change in 0.3.0. Reasoning: - Type names in toxcore start with an uppercase letter and either have at least one lowercase letter in them, or are less than 4 characters long. - Constants consist of 4 or more uppercase letters or underscores. By these rules, "DHT" is a type name, but "TOX_USER_STATUS" is a constant. We provide Tox_User_Status as an alternative for now, and will switch to that in 0.3.0, removing the UPPER_CASE versions.
2018-08-11Split out conference type (text/av) from identifier.iphydf
2018-08-10Use the crypto random functions instead of `rand()`.iphydf
Presumably the uses of `rand()` were fine because they were not used in security-sensitive places, but having to think about whether a crappy RNG is acceptable in each situation requires effort that could better be spent elsewhere. Also, this means that once we have a custom deterministic RNG for testing, that RNG is used everywhere, so all the code is deterministic. It also allowed us to delete a system-specific function that wasn't used anywhere except in a call to `srand()`.
2018-08-09Fix typo in loop over assocs.zugz (tox)
2018-08-08Release 0.2.5Robin Lindén
2018-08-04Fix error message in m_send_generic_messageendoffile78
2018-08-04Remove unused `m_callback_log` function.iphydf
The logger callback can only be set once at the beginning, because it requires user data coming from `Tox_Options`.