summaryrefslogtreecommitdiff
path: root/toxcore
AgeCommit message (Collapse)Author
2017-01-11Fix logging condition for IPv6 client timestamp updates.iphydf
2017-01-10Always kill invalid file transfers when receiving file controls.iphydf
Previously, toxcore would send a kill control to the friend only if the file control was valid. Determining which file transfer is used does not depend on the specific file control. We can always kill it in that case. Also, added some logging for file control logic, since there is no other feedback on error (failure of the file control handler is swallowed).
2017-01-10Minor simplification in `file_seek` code.iphydf
Details in comments.
2017-01-07Remove \ at end of list in makefile.iphydf
2017-01-07Replace make_quick_sort with qsortendoffile78
2017-01-07Avoid accessing uninitialised memory in `net_crypto`.iphydf
On x86 and x86_64, this change has no effect. On IA64, this fixes a potential hardware exception. A function returned a partially initialised value of aggregate type. The only caller of this function checks that the value is valid before accessing it by testing the one definitely initialised member. Therefore on x86 and derived architectures, there is no uninitialised memory access. On IA64, with the regular calling convention, the struct is allocated on the caller stack and passed as a pointer, so there the uninitialised memory is also never accessed. However, on calling conventions where one or more struct members past the first byte are passed in registers or copied in memory, this call can cause undefined behaviour. Specifically, the value can contain a trap representation of the integers (at the very least the 16 bit port) and cause a hardware exception and SIGFPE in userland. Regardless of the explanation above, this change fixes an instance of undefined behaviour that just happened to be OK on all systems we tested on.
2017-01-06Fix bad attempt at refactoringMaxim Biro
2017-01-06Eliminate dead return statement.iphydf
Previously, the `ipv6` variable was initialised to `-1`, but that value was never read. Either it was set to 0 or 1, or the function would return before it was read. Thus, I've changed it to uninitialised `bool is_ipv4` (inverted semantics to avoid negative conditions `if (!is_ipv6)`). The `pack_ip_port` function is a bit unfortunate, but I'm not rewriting it until we have a binary writer (I'd be rewriting it twice).
2017-01-06Revert "Revert "Portability fixes""David Zero
This reverts commit 59e2a844f04a8725e8079f854158aa86ef5988b2, and defines _DARWIN_C_SOURCE in toxcore/network.c
2017-01-05Release v0.1.3.iphydf
2017-01-05Revert "Portability fixes"endoffile78
This reverts commit f3469070fe899e8e4fd88665386a55bad9f77cd8.
2017-01-04Portability fixesDavid Zero
- 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.
2017-01-04Add secure memcmp and memzero implementation.Diadlo
Implementation mostly taken from libsodium utils. Fix #347
2016-12-23Release v0.1.2iphydf
2016-12-22Remove tox_options_copy.iphydf
2016-12-22Use `tox_options_set_*` instead of direct member access.iphydf
Also added a `tox_options_copy` function for cloning an options object. This can be useful when creating several Tox instances with slightly varying options.
2016-12-22Improve documentation of crypto_core.iphydf
2016-12-22Wrap all sodium/nacl functions in crypto_core.c.iphydf
2016-12-20Avoid array out of bounds read in friend saving.iphydf
Fixes #345.
2016-12-17Release v0.1.1iphydf
2016-12-16Strengthen the note about ABI compatibility in tox.h.iphydf
We really want to get all clients off this struct. We won't actually remove it until 0.2, but we're going to break ABI compatibility with this in various 0.1.x releases.
2016-12-15Drop an unworking MacroGregory Mullen (grayhatter)
Closes #327
2016-12-14Add option to disable local peer discoveryMaxim Biro
2016-12-14Release 0.1.0.iphydf
Fixes #216.
2016-12-13Fix version compatibility test.sudden6
Also added some test cases for it.
2016-12-13Fix padding in SAVED_FRIEND struct and add test.Robin Lindén
Test covers saving and loading of a Tox instance with a friend added.
2016-12-12Conditionally enable non-portable assert on LP64.iphydf
This only works on LP64. It may fail on Windows, which can be LLP64 (IL32P64).
2016-12-10Fix off by one error in saving our own status message.iphydf
2016-12-10net_crypto give handle_data_packet_helper a better nameGregory Mullen (grayhatter)
2016-12-03rename messenger function, prepend m_Gregory Mullen (grayhatter)
2016-11-24Version Patch v0.0.4 => v0.0.5Gregory Mullen (grayhatter)
2016-11-24add NAT hole punching level to Tox APIGregory Mullen (grayhatter)
2016-11-21Made saveformat platform-independent.Robin Lindén
Fixes #215.
2016-11-21Mark Tox_Options struct as deprecated.iphydf
We will remove it in v0.1.
2016-11-15Convert to and from network byte order in set/get nospam.iphydf
Fixes #205.
2016-11-14new_messenger(options ... ) must never be nullGregory Mullen (grayhatter)
2016-11-14v0.0.4iphydf
2016-11-12Use apidsl for the crypto_core API.iphydf
This allows us to use apidsl features like namespaces to enforce a naming standard.
2016-11-11Add DHT_create_packetendoffile78
2016-11-09Remove new_nonce function in favour of random_nonce.iphydf
`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.
2016-11-07Release v0.0.3.iphydf
2016-11-06Move log callback to options.iphydf
Previously, all log messages generated by tox_new (which is quite a lot) were dropped, because client code had no chance to register a logging callback, yet. This change allows setting the log callback from the beginning and removes the ability to unset it. Since the log callback is forever special, since it can't be stateless, we don't necessarily need to treat it uniformly (with `event`).
2016-11-06Rename log levels to remove the extra "LOG" prefix.iphydf
`TOX_LOG_LEVEL_LOG_TRACE` => `TOX_LOG_LEVEL_TRACE`.
2016-11-06Change packet kind enum to use hex constants.iphydf
Hex constants make it clearer that you can only use 2 nibbles (the two digits of the number, displayed as two columns in the source code), i.e. 1 byte, for the packet kind. It also makes the bit representation easier to see.
2016-11-06Remove assocendoffile78
2016-11-05Convert series of NET_PACKET_* defines into a typedef enumGregory Mullen (grayhatter)
fixup! TravisCI shorten IRC message
2016-11-03Move packing and unpacking DHT request packets to DHT module.iphydf
These definitely don't belong in a module called "crypto core". The DHT module seems like the best place to put them, since they are sent to DHT nodes.
2016-11-02Compile as C++ for windows builds.iphydf
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.
2016-11-02Remove unimplemented "time delta" parameter.iphydf
In the future, we may want to revisit this parameter, but right now, it serves no purpose and only confuses tools.
2016-10-30Version Patch v0.0.2Gregory Mullen (grayhatter)