Age | Commit message (Collapse) | Author |
|
`tox_options_[gs]et_ipv6_enabled` were missing from the version script
because the grep expression only accepted `[a-z_]`. Now it also accepts
digits in the function names.
|
|
|
|
Tests for Windows are disabled for now, until we figure out which tests
can successfully run on wine and select only those.
|
|
This reverts commit 21f8db12c45bd56293262cd4abfb73cd9abec821.
It is currently broken. Incoming call callbacks are not invoked, and
instead the client goes offline immediately.
|
|
Enabling this flag will generate and use an LD version script. It
ensures that the dynamic libraries (libtoxcore.so, libtoxav.so) only
export the symbols that are defined in their public API (tox.h and
toxav.h, respectively).
|
|
other users.
|
|
|
|
|
|
The public one already does this, and the internal one actually assigns
`uint32_t`s.
|
|
|
|
|
|
|
|
|
|
|
|
size_t is unsigned long long on LLP64 and %lu prints unsigned long (32
bit), potentially causing problems.
|
|
|
|
In the future, all TODOs added either need a bug number (TODO(#NN)) or a
person's github user name. By default, I made irungentoo the owner of
all toxcore TODOs, mannol the owner of toxav TODOs, and myself the owner
of API TODOs.
|
|
|
|
This test is already performed by `make test` later on. We originally
had it in the Travis script to make it fail fast when the format is
wrong, but there is also some value in running all tests despite format
errors.
Fixes #83. There are no more relevant phases that would benefit from the
padding lines proposed.
|
|
|
|
This header is a requirement for the public API, therefore is assumed to
exist. It is a C99 standard library header, and _Bool is not intended to
be used directly, except in legacy code that defines bool (and
true/false) itself. We don't use or depend on such code. None of our
client code uses or depends on such code. There is no reason to not use
bool.
|
|
It now enforces a bit more formatting. In particular, padding inside
parentheses is removed. I would like it to remove padding after unary
operators, but there seems to be no option for that.
|
|
1. Current module (if C file).
2. Headers from current library.
3. Headers from other library (e.g. toxcore includes in toxav).
4. System headers.
|
|
|
|
See #78.
|
|
This is the first step towards unifying travis configs for toxcore,
hstox, and qtox.
|
|
|
|
Check to ensure that all 3 tox instances are up rather than
just one.
|
|
|
|
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
|
|
Allows us to pack IP_Port structs that are part of arbitrarily structured data.
|
|
ApiDSL generates the lowercase function declarations for us and puts them in the
right namespace (TOX_, TOXAV_).
|
|
This used to not be an issue, but now that the logger is no longer
global, not all source locations may have access to it.
|
|
- 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.
|
|
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.
|
|
|
|
We didn't need to create the logger before all the validations. There is only
one error path where we need to free the logger.
|
|
|
|
|
|
|
|
|
|
- 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.
|
|
|
|
- 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.
|
|
Messenger is slightly twisty when it comes to sending connection status
callbacks It will very likely need at the very least a partial refactor to
clean it up a bit. Toxcore shouldn't need void *userdata as deep as is
currently does.
(amend 1) Because of the nature of toxcore connection callbacks, I decided to
change this commit from statelessness for connections changes to statelessness
for friend requests. It's simpler this was and doesn't include doing anything
foolish in the time between commits.
group fixup because grayhatter doesn't want to do it
"arguably correct" is not how you write security sensitive code
Clear a compiler warning about types within a function.
|
|
|
|
https://msdn.microsoft.com/en-gb/library/windows/desktop/aa365917(v=vs.85).aspx
shows an example use of GetAdaptersInfo that does it this way.
|
|
Ensure that nobody inadvertly modifies the temporary packet data buffer.
|
|
|
|
|