summaryrefslogtreecommitdiff
path: root/toxav
AgeCommit message (Collapse)Author
2020-05-17Format comments according to tokstyle's requirements.iphydf
2020-05-03Fix a bug in savedata loading when malloc fails.iphydf
Also added a bunch of asserts to tests where they don't check allocs.
2020-05-03Enable cimple tests by default but allow disabling them.iphydf
Use `bazel test //c-toxcore/... --build_tag_filters=-haskell` to run all tests except the ones that depend on Haskell (i.e. cimple tests).
2020-05-02Fix errors on error paths found by oomer.iphydf
* Use-after-free because we free network before dht in one case. * Various unchecked allocs in tests (not so important). * We used to not check whether ping arrays were actually allocated in DHT. * `ping_kill` and `ping_array_kill` used to crash when passing NULL. Also: * Added an assert in all public API functions to ensure tox isn't NULL. The error message you get from that is a bit nicer than "Segmentation fault" when clients (or our tests) do things wrong. * Decreased the sleep time in iterate_all_wait from 20ms to 5ms. Everything seems to still work with 5ms, and this greatly decreases the amount of time spent per test run, making oomer run much faster.
2020-04-16Remove tokstyle exemptions from build files.iphydf
We put some tokstyle exemptions into the source files themselves, instead. This way we can check some of the code in those files, and more in the future when tokstyle supports more constructs (like apidsl). Also: hacked ping_array.api.h to not emit `_array` as parameter names. We'll need to fix apidsl to do this better. This works for now.
2020-04-09Use public API for sending in RTP.zoff99
2020-04-08Use public API for sending in BWC.zoff99
2020-04-07Remove newlines from the end of LOGGER format strings.iphydf
See https://github.com/TokTok/hs-tokstyle/pull/49 for the corresponding tokstyle analysis.
2020-04-07Change ToxAVCall struct mutex to a more distinct name.zoff99
2020-04-07Create own instance of MonoTime for ToxAV.zoff99
2020-04-05Stop using Messenger's mono_time in bandwidth controller.zoff99
We're actually still using it, but we got a private pointer now, preparing us for having a private mono_time in toxav.
2020-04-05Fix 2 memory leaks in ToxAV.zoff99
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-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-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-12Use rules_cc instead of native cc_library rules.iphydf
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-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-02fix ToxAV threading documentationsudden6
ToxAV is not thread-safe at the moment, remove that claim from the header file.
2019-11-21fix log message creating data racesudden6
2019-11-21fix missing mutexsudden6
2019-11-21fix ToxAV mutex released to earlysudden6
2019-02-10put toxav.h stuff in toxav.api.hzugz (tox)
2019-02-10explain enabling in API commentzugz (tox)
2019-02-10add API function to test whether av is enabledzugz (tox)
2019-02-10Expose api functions for enabling and disabling AV in AV groupszugz (tox)
A group loaded from a savefile starts with AV disabled.
2019-01-05Expose offline conference peers in APIzugz (tox)
2018-10-08Improve Windows compatibility of toxav code.iphydf
- unistd.h doesn't exist on MSVC. - `vpx_codec_iface_t` is already `const`, so adding `const` qualifiers is redundant and causes warnings on MSVC.
2018-09-24Revert "Improve cmake build for MSVC."iphydf
This reverts commit f87f8719d02a9adbc9413256fe22958267cfefee.
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-22Improve cmake build for MSVC.Mick Sayson
2018-09-21Fix using uninitialized mutex on call end.Mick Sayson
2018-09-19Fix typosyangfl
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-08Always use the passed logger (from Messenger) in msi_kill.iphydf
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-26Update copyright to 2018.iphydf
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-19Avoid redefining macros from different files.iphydf
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-16Limit the size of a save file in file_saving_test.iphydf
Limited to 4GiB. That ought to be enough for any save file.
2018-08-14Fix style in toxav.c.iphydf
* Use Camel_Snake_Case for type names. * Use at least 4 characters for constant names. I.e. `END` is a type name, but `RETURN` is a constant name. This is because `DHT` is a type name (yay consistency). * Using `min_*` functions instead of MIN, we can avoid a cast. * Use `for`-loops for for-each-frame semantics instead of `while`. * Don't use assignments as expressions. * `++i` instead of `i++`. * Function pointers are dereferenced automatically, so no need to manually do so. * Avoid void pointers that lie about not being spaghetti code. Toxcore and toxav are both spaghetti and shouldn't pretend anything else. * Don't use empty statements (e.g. no `;;` anywhere in the code).
2018-08-13Fix ToxAv's use of `struct Tox`.iphydf
* Fix `toxav_get_tox` to return tox, not messenger. * Fix the casts from Tox* to Messenger* in toxav_old.c. * Pass Tox instead of Messenger to public group AV callbacks.