summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-04-05Make afl_toxsave.c a bit more portable; fix memleak.iphydf
malloc.h doesn't exist on most platforms, and certainly not in stdc. No functions from malloc.h are actually used here, and stdlib.h is enough.
2020-04-04Show function names in asan/tsan stack traces on CircleCI.zoff99
2020-04-04Migrate format-source script to new apidsl web app.iphydf
This one is unfortunately a little more complicated to use. I may add a simpler API later, but for now, it's JSON-based (because I couldn't get binary data to work without it getting mangled somewhere along the way - JSON is at least text-transport-safe).
2020-04-04Add minimal save generatorMaxim Biro
2020-03-29Fixes towards building on MSVC.iphydf
2020-03-27Mark conference test as small.iphydf
This used to take a long time, but is now very fast.
2020-03-24Add basic test adapter for AFLsudden6
2020-03-22Smarter setup of bazel remote cache on Cirrus CI.iphydf
We now check whether the cache application is reachable and running via cURL. If it's running, we add the `--config=remote` line.
2020-03-22Release 0.2.11Robin Linden
2020-03-22Install libsodium from apt instead of from source.iphydf
2020-03-22Minor cleanups in network code.iphydf
Remove useless parameter, replace with assert (just to be sure). Also replaced some memsets with 0-initialiser and memcpy with assignment.
2020-03-22Minor cleanup: use `assoc_timeout` function where possible.iphydf
This function exists and simplifies some code a little bit. There are lots of places in DHT.c where we have the exact same code, so there is a lot of opportunity to factor out common bits. For now, we just make a minor improvement that's easy to review.
2020-03-22fix typo: now we periodically try to send direct packets when connected by tcpzugz (tox)
2020-03-22Remove bazel build from Travis.iphydf
We already have one on Cirrus, and it works fine.
2020-03-21Disable bazel remote cache on CI.iphydf
code.tox.chat is down.
2020-03-18clear out old conference connectionszugz (tox)
This may fix problems with very large conferences. Sadly, it seems infeasible to test large conferences on one machine, so this is entirely theoretical.
2020-03-18Add "member" invite responsezugz (tox)
This allows invitations to work in the case that the invitee is already in the group, which can happen if the group becomes split. Such an invitation is automatically accepted, leading to the peers becoming connected in the group and sharing peer lists.
2020-03-18Make function defns match their decls regarding storage class.iphydf
We want functions declared as `static` to also be defined as `static`.
2020-03-18Check that LOGGER macros are only called with string literals.iphydf
Avoid any dynamic format strings, even ones like `cond ? "str1" : "str2"`.
2020-03-18Mark file-local function definitions as `static`.iphydf
https://github.com/TokTok/hs-tokstyle/pull/43 implements a validation for this. We should avoid locally declaring functions from another translation unit, and instead use header files to export/import them.
2020-03-17Enable remote cache for bazel builds.iphydf
2020-03-15Add another bootstrap node to the bootstrap test.iphydf
Hopefully not both will be down at the same time.
2020-03-15clean groups codezugz (tox)
* make static functions return bool rather than int to indicate success * add peer_in_list() to factor out uniformity over peer and frozen lists * reduce repetition in send_lossy_all_close * rename 'close' to 'connections' * use uint32_t for peernumber (in accord with tox.c) * explain persistence in tox_conference_get_chatlist documentation * clarify "connectedness" in group API documentation * clarify that tox_conference_peer_count counts only online peers * refactor variously
2020-03-14Avoid casting back and forth between void-ptr.iphydf
In windows network code, we implement inet_pton and inet_ntop, which take void pointers. We can do slightly better because we already know the type when we call these functions, so we can avoid casting between void pointer and the addr struct types.
2020-03-14Standardise on having a comma at the end of enums.iphydf
Most of our enums already have one. Some didn't. Tokstyle is going to require commas at the end of enumerator lists in enum definitions.
2020-03-14Fix up comments a bit to start being more uniform.iphydf
Tokstyle (check-cimple) will start enforcing comment formats at some point. It will not support arbitrary stuff in comments, and will parse them. The result can then be semantically analysed.
2020-03-14Use spdx license identifier instead of GPL blurb.iphydf
2020-03-14use -1 rather than ~0 in unsigned integer typeszugz (tox)
Using ~0 involves a bitwise operation on int, so depends on the internal representation of signed integers.
2020-03-12Use rules_cc instead of native cc_library rules.iphydf
2020-03-11Add a mutex lock/unlock inside every public API function.iphydf
2020-03-10Enable FreeBSD jobs on Travis-CIMaxim Biro
2020-03-10Update and fix FreeBSD setup on Travis-CIMaxim Biro
- Bump FreeBSD to 12.1. - Simplify stage1 logic. - Re-try downloading the image from a different mirror if one fails. - Use the `expect` utility instead of dealing with screen's log file. - Re-run failed toxcore test one more time and in sequence.
2020-03-08Pass packet ID to custom packet handlers.iphydf
We don't expose this to the user code, yet, because it would break the API, but this is useful for future internal code.
2020-03-06Use `net_pack` instead of casting bytes to ints.iphydf
The current code violates the C standard and causes crashes on strict alignment architectures.
2020-03-05Use ninja build system for the cmake-linux build.iphydf
2020-03-05Use net_pack/unpack instead of host_to_net.iphydf
The latter is doing pretty much the same thing but in a confusing way (it doesn't change the type of the variable, but does change the semantics).
2020-03-05Disable FreeBSD travis build until it is fixed.iphydf
2020-03-03Update tox-bootstrapd's dockerfile to use Debian BusterMaxim Biro
2020-03-03Fix tox-bootstrapd's READMEMaxim Biro
2020-03-02Remove testing/av_test.c.iphydf
It's a maintenance burden. Nobody uses this. It depends on an ancient version of opencv that less and less systems actually have.
2020-03-02bump to astyle-3.1 in travis buildzugz (tox)
2020-03-02Add "cimple_test" to the bazel build.iphydf
2020-03-02Upgrade bazel to 2.1.1.iphydf
Removed av_test, because it depends on an ancient opencv that starts to really not exist on modern systems anymore.
2020-01-22handle message_number wraparoundzugz (tox)
2020-01-22workaround for message number saving (fixes #961)zugz (tox)
Put a future message number into the save file. Peers require the message numbers of messages we send to increase monotonically. If we save the current message number, then send further messages, then quit without saving (e.g. due to a crash), and then resume from the old save data, then monotonicity will fail. This commit works around this problem by introducing an offset when the current message number, so that even in the above circumstance, as long as fewer messages than the offset were sent between saving and reloading, the sent message numbers will increase monotonically. The choice of offset is a balance between wanting it to be large enough that there is room for plenty of messages to be sent in the above scenario, and wanting to avoid the following potential problem: if we repeatedly save and reload without sending any further messages, then the message number may increase so far that peers will interpret an eventual message as being old. This is not conceivably a practical issue for the 32bit lossless message numbers, but is a concern for the 16bit lossy message numbers.
2020-01-22refactorzugz (tox)
2020-01-02fix ToxAV threading documentationsudden6
ToxAV is not thread-safe at the moment, remove that claim from the header file.
2020-01-02synchronize call control actions to tox_iteratesudden6
2019-12-25don't wait for connection when killing Toxsudden6
When tox_kill is called no other thread should be running anymore so this locking is not needed there.
2019-12-23fix invalid use of mutexsudden6
- Moving a pthread_mutex in memory (e.g. via realloc()) is undefined behavior. - add a state for allocated but not yet used crypto connections - change crypto_connection_status signature