Age | Commit message (Collapse) | Author |
|
- 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.
|
|
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.
|
|
Ensure that nobody inadvertly modifies the temporary packet data buffer.
|
|
http://llvm.org/docs/CodingStandards.html#use-early-exits-and-continue-to-simplify-code
|
|
|
|
|
|
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.
|
|
The condition is a potential use after free, because `connection_kill` before it
will delete the `conn` that is dereferenced.
|
|
See #27 and #40 for details.
|
|
Fixed bug from merged PR.
Don't build useless files when building with libsodium.
|
|
|
|
fix: make increment_nonce & increment_nonce_number independent of user-controlled input
fix: make crypto_core more stable agains null ptr dereference
|
|
|
|
|
|
Fix bug that limited it to 1K packets per second.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
connected.
|
|
|
|
Use a formula instead of magic numbers.
|
|
Fixed file transfers disconnecting tox clients from each other in
some network conditions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Calculate public key from it.
|
|
Reduced the amount of waste from dropped packets.
|
|
|
|
|
|
|
|
Replaced void * with uint8_t * in list.c
|
|
Removed useless include.
|
|
|
|
A TCP callback could be received when only a UDP connection was present.
Increased a UDP timeout to make it less likely to time out and switch to TCP.
|
|
|
|
|
|
TCP_connections can now be put to sleep, a state where they store what they
were connected to without being connected and then resumed from sleep.
|