summaryrefslogtreecommitdiff
path: root/toxav
AgeCommit message (Collapse)Author
2016-09-09Minor cleanups: header reordering, adding {}.iphydf
I hadn't done this for the "fun" code, yet. Also, we should include system headers after our own headers. "In general, a module should be implemented by one or more .cpp files. Each of these .cpp files should include the header that defines their interface first. This ensures that all of the dependences of the module header have been properly added to the module header itself, and are not implicit. System headers should be included after user headers for a translation unit." -- http://llvm.org/docs/CodingStandards.html#a-public-header-file-is-a-module
2016-09-09Use `const` for version numbers.iphydf
ApiDSL generates the lowercase function declarations for us and puts them in the right namespace (TOX_, TOXAV_).
2016-09-08Fix compilation for Windows.iphydf
- Mingw32 didn't read MSDN, so behaves badly despite lean and mean. - Avoid alignment issues on windows with packed bitfields in the RTP header. This change makes the program ill-formed in C99, but I don't know the correct fix at the moment, and I don't want to keep the Windows build broken for too long.
2016-09-08Remove the packet mutation in toxav's bwcontroller.iphydf
1. This mutation is never observed outside the function. 2. If it were (it's not), it would be undefined behaviour, since the packet data goes out of scope a few instructions after the callback returns.
2016-09-07Comment intentional switch fallthroughsJfreegman
2016-09-06Improve static and const correctness.iphydf
- Any non-externally-visible declarations should be `static`. - Casting away the `const` qualifier from pointers-to-const is dangerous. All but one instance of this are now correct. The one instance where we can't keep `const` is one where toxav code actually writes to a chunk of memory marked as `const`. This code also assumes 4 byte alignment of data packets. I don't know whether that is a valid assumption, but it's likely unportable, and *not* obviously correct. - Replaced empty parameter lists with `(void)` to avoid passing parameters to it. Empty parameter lists are old style declarations for unknown number and type of arguments. - Commented out (as `#if DHT_HARDENING` block) the hardening code that was never executed. - Minor style fix: don't use `default` in enum-switches unless the number of enumerators in the default case is very large. In this case, it was 2, so we want to list them both explicitly to be warned about missing one if we add one in the future. - Removed the only two function declarations from nTox.h and put them into nTox.c. They are not used outside and nTox is not a library.
2016-09-06Improve C standard compliance.iphydf
- Don't cast between object and function pointers. - Use standard compliant `__VA_ARGS__` in macros. - Add explicit `__extension__` on unnamed union in struct (it's a GNU extension). - Remove ; after function definitions. - Replace `const T foo = 3;` for integral types `T` with `enum { foo = 3 };`. Folding integral constants like that as compile time constants is a GNU extension. Arrays allocated with `foo` as dimension are VLAs on strictly compliant C99 compilers. - Replace empty initialiser list `{}` with zero-initialiser-list `{0}`. The former is a GNU extension meaning the latter. - Cast `T*` (where `T != void`) to `void *` in format arguments. While any object pointer can be implicitly converted to and from `void *`, this conversion does not happen in variadic function calls. - Replace arithmetic on `void *` with arithmetic on `char *`. The former is non-compliant. - Replace non-`int`-derived types (like `uint16_t`, which is `short`-derived) in bit fields with `int`-derived types. Using any type other than `int` or `unsigned int` (or any of their aliases) in bit fields is a GNU extension.
2016-09-02Do not use `else` after `return`.iphydf
http://llvm.org/docs/CodingStandards.html#use-early-exits-and-continue-to-simplify-code
2016-09-01Remove useless casts.iphydf
These casts are either completely useless (casting T to T) or implicit (x = y).
2016-09-01Sort #includes in all source files.iphydf
2016-09-01Match parameter names in declarations with their definitions.iphydf
The parameter names were taken from function definitions to update the names in function declarations (prototypes).
2016-08-31Add newlines because astyle wants them.iphydf
We'll revert this once we move to clang-format.
2016-08-31Add braces to all if statements.iphydf
2016-08-27Move logging to a callback.iphydf
This removes the global logger (which by the way was deleted when the first tox was killed, so other toxes would then stop logging). Various bits of the code now carry a logger or pass it around. It's a bit less transparent now, but now there is no need to have a global logger, and clients can decide what to log and where.
2016-08-18Fix some compiler warnings.iphydf
2016-08-12Add and use CMake build scriptiphydf
Also, fix the hstox build that was taking half an hour. It now takes 5 minutes. Also, perform distcheck on travis to ensure that make dist works. It's not actually failing the build at the moment due to broken tests.
2016-08-12Check code formatting on Travis.iphydf
We run astyle on Travis and check if there is a diff. The build terminates if git finds a difference.
2016-08-10Silence/fix some compiler warnings.iphydf
Some of these (like the incompatible pointers one) are really annoying for later refactoring.
2016-03-09Added astyled toxav.h to match toxav.in.hderive
2016-02-13added the dropped ;Gregory Mullen (GrayHatter)
2016-02-13missed a line tox to toxavGregory Mullen (GrayHatter)
2016-02-13update the compatablity function to match the macroGregory Mullen (GrayHatter)
2016-02-13SemVer toxav tooGregory Mullen (GrayHatter)
2016-01-13Fix issue #1497Eniz Vukovic
2015-12-15Fixed use of it after free.irungentoo
2015-11-29Fix error reporting in toxav_call()Eniz Vukovic
2015-11-19Merge branch 'master' of https://github.com/helium-software/toxcoreirungentoo
2015-11-17Mannol toxav fix.irungentoo
2015-11-11fix BWController misspellingTibor Stolz
2015-11-04Prevent debug message from spamming stdoutJfreegman
2015-11-03Astyle.irungentoo
2015-11-03Fix compile error on mingwEniz Vukovic
2015-10-31Revert "Removed mutex operations"Eniz Vukovic
2015-10-26Fix possible misalignment of RTP headerEniz Vukovic
2015-10-24Fix misplaced log message.mannol
2015-10-24Add synchronization protection for send_frame API functionsEniz Vukovic
2015-10-23Removed mutex operationsEniz Vukovic
2015-10-23Added mutex lock+unlock.irungentoo
Should it be also added to the other parts of this function?
2015-10-23Fixed error in last commit.irungentoo
2015-10-23Fixed some memory related bugs.irungentoo
2015-10-23Fix docsmannol
2015-10-23Fix setting resolution for vpx v1.4 (or newer i suppose)Eniz Vukovic
2015-10-13Fix typo and change logger config optionEniz Vukovic
2015-10-12Return removed groupchats codeEniz Vukovic
2015-10-11Remove old commentEniz Vukovic
2015-10-10UpdateEniz Vukovic
2015-10-10New Adaptive BR algorithm, cleanups and fixesEniz Vukovic
2015-08-18typokrobelus
2015-08-13Fix bug in codec initializationmannol
2015-08-09Updated with upstreammannol