summaryrefslogtreecommitdiff
path: root/toxcore
AgeCommit message (Collapse)Author
2019-01-03Added test and patch for VLA stack overflow vuln.zoff99
Also added and used the new crypto_malloc and crypto_free. The latter also zeroes out the memory safely. The former only exists for symmetry (static analysis can detect asymmetric usages).
2018-11-29Implement conferences savingzugz (tox)
* add global friend_connection status callback, used for group rejoining * stop leaving groups on killing tox
2018-11-23Return TOX_ERR_CONFERENCE_SEND_MESSAGE_NO_CONNECTION if we are not connected ↵zugz (tox)
to any peers
2018-10-31Add some hopefully helpful documentation to the functions in mono_time.hzugz (tox)
(I found I couldn't remember whether get_mono_time returned unix time or not, and had to source-dive to find out. This should make that unnecessary next time!)
2018-10-24Change method of PK production for fake friend in DHTNamsooCho
2018-10-20Make saving and loading the responsibility of Tox rather than Messengerzugz (tox)
2018-10-19Add `LOGGER_ASSERT` for checking fatal error conditions.iphydf
These are not compiled out under `NDEBUG` and should be provably correct.
2018-10-16Support DragonFlyBSD and prune unused variables.Leonid Bobrov
2018-10-11ensure save data unchanged after save and loadzugz (tox)
2018-10-09Consistently use camel case enum names.iphydf
Including in tests and implementation files.
2018-10-08Add LAN_discovery to the list of apidsl-generated files.iphydf
So it gets regenerated when the .api.h file changes.
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