Age | Commit message (Collapse) | Author |
|
|
|
Using the full path including the repo name.
|
|
|
|
|
|
Presumably the uses of `rand()` were fine because they were not used in
security-sensitive places, but having to think about whether a crappy RNG
is acceptable in each situation requires effort that could better be
spent elsewhere.
Also, this means that once we have a custom deterministic RNG for
testing, that RNG is used everywhere, so all the code is deterministic.
It also allowed us to delete a system-specific function that wasn't used
anywhere except in a call to `srand()`.
|
|
* Moved PAIR to toxav, where it's used (but really this should die).
* Replace most MIN calls with typed `min_*` calls. Didn't replace the
ones where the desired semantics are unclear. Moved the MIN macro to
the one place where it's still used.
* Avoid assignments in `while` loops. Instead, factored out the loop body
into a separate `bool`-returning function.
* Use named types for callbacks (`_cb` types).
* Avoid assignments in `if` conditions.
* Removed `MAKE_REALLOC` and expanded its two calls. We can't have
templates in C, and this fake templating is ugly and hard to analyse
and debug (it expands on a single line).
* Moved epoll system include to the .c file, out of the .h file.
* Avoid assignments in expressions (`a = b = c;`).
* Avoid multiple declarators per struct member declaration.
* Fix naming inconsistencies.
* Replace `net_to_host` macro with function.
|
|
|
|
This reverts commit 5ff099763b1f56414572e1c12eb2f003117db5a0.
|
|
|
|
"All rights reserved" was incorrect. The project was licensed under GPL3,
which means a lot of rights are licensed to everybody in the world, i.e.
not reserved to the "Tox Project".
|
|
|
|
|
|
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 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.
|
|
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.
|
|
See #27 and #40 for details.
|
|
|
|
|
|
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.
|
|
Added a function to enable and disable TCP onion connections.
|
|
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.
|
|
|
|
for that purpose.
|
|
with them.
|
|
Fixed that the first TCP relays in the list would never be disconnected
even if they were useless.
|
|
to a friend.
Give the connection a couple seconds (TCP_CONNECTION_ANNOUNCE_TIMEOUT) to
connect itself to the friend before killing it if we are already connected to
enough total relays.
|
|
The main thing left to do is the reconnect if we get disconnected part.
|
|
Only thing left is testing and integrating it in net_crypto.
|
|
Only a couple things left to add.
|
|
|
|
The plan is to move some of the TCP stuff from net_crypto into it.
|