Age | Commit message (Collapse) | Author |
|
This reverts commit 59e2a844f04a8725e8079f854158aa86ef5988b2, and
defines _DARWIN_C_SOURCE in toxcore/network.c
|
|
This reverts commit f3469070fe899e8e4fd88665386a55bad9f77cd8.
|
|
- CFLAG gnu99 was changed to c99.
- CXXFLAG c++98 was changed to c++11.
- CFLAG -pedantic-errors was added so that non-ISO C now throws errors.
- _XOPEN_SOURCE feature test macro added and set to 600 to expose SUSv3
and c99 definitions in modules that required them.
- Fixed tests (and bootstrap daemon logging) that were failing due to
the altered build flags.
- Avoid string suffix misinterpretation; explicit narrowing conversion.
- Misc. additions to .gitignore to make sure build artifacts don't wind
up in version control.
|
|
|
|
`new_nonce` has been an alias for `random_nonce` for a while now. Having
two names for the same operation is confusing. `random_nonce` better
expresses the intent. The documentation for `new_nonce` talks about
guaranteeing that the nonce is different from previous ones, which is
incorrect, it's just quite likely to be different.
|
|
Compiling as C++ changes nothing semantically, but ensures that we don't
break C++ compatibility while also retaining C compatibility.
C++ compatibility is useful for tooling and additional diagnostics and
analyses.
|
|
Not all platforms define `socklen_t` as `unsigned int`. E.g. Android
defines it as `int`.
|
|
It is still C code, so still compatible with C compilers as well. This
change lets us see more clearly where implicit conversions occur by
making them explicit.
|
|
We should aim to make as many structures module-private as possible.
|
|
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.
|
|
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.
|
|
http://llvm.org/docs/CodingStandards.html#use-early-exits-and-continue-to-simplify-code
|
|
|
|
|
|
fix: make increment_nonce & increment_nonce_number independent of user-controlled input
fix: make crypto_core more stable agains null ptr dereference
|
|
|
|
|
|
|
|
This may or may not improve things.
|
|
Use epoll to detect when socket closed connection.
|
|
Function returned success when should have returned failure.
|
|
|
|
onion.c was parsing recieved packets a bit too strictly and discarding
packets that had ips with non valid families.
TCP uses a non valid family to send back the packet to the proper
connected node.
|
|
|
|
|
|
|
|
|
|
|
|
older kernels.
|
|
|
|
|
|
|
|
|
|
Packet was being copied with a wrong, smaller length.
|
|
Don't increment nonce if packet was discarded instead of being sent.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
enabled because all it does then is send pings and check timeouts
which are calculated by the second.
|
|
Cleaned up TCP server a bit.
|
|
|
|
|
|
|
|
sometimes wasn't.
|
|
|