summaryrefslogtreecommitdiff
path: root/auto_tests/onion_test.c
AgeCommit message (Collapse)Author
2016-09-06Improve static and const correctness.iphydf
- 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.
2016-09-06Make friend requests statelessGregory Mullen (grayhatter)
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.
2016-09-01Sort #includes in all source files.iphydf
2016-08-31Add braces to all if statements.iphydf
2016-08-27Move logging to a callback.iphydf
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.
2016-08-18Fix some compiler warnings.iphydf
2016-08-18Make tox_callback_friend_name stateless.iphydf
See #27 and #40 for details.
2015-12-15Onion test fixed to work with faster DHT.irungentoo
2015-04-06Fixed onion test.irungentoo
2015-02-07Properly free everything at the end of each test.irungentoo
2015-01-29Code cleanups.irungentoo
Rename array in Node_format from client_id to public_key.
2014-11-21Cleaned up packet length types in toxcore.irungentoo
They are now all uint16_t instead of sometimes being uint32_t. Replaced some other uint32_t with unsigned ints.
2014-09-26Added callbacks to onion_client and net_crypto for the temp dht key.irungentoo
Better than the polling mess. Moved DHT to Messenger from onion_client (still needs some cleanups).
2014-08-14Added basic socks5 proxy support to TCP client.irungentoo
2014-08-13Decreased maximum onion_test test time.irungentoo
2014-08-09Remove DEFTESTCASE and DEFTESTCASE_SLOW redefinitionspyruvate
2014-06-15Fixed some warnings.irungentoo
2014-05-12Fixed onion test.irungentoo
2014-04-23Updated some files so that they could build with latest core.irungentoo
Fixed some issues.
2014-04-15Fixed regression, announce responses can contain 0 nodes.irungentoo
2014-02-27Fixed onion test.irungentoo
2014-02-26Fixed/updated tests.irungentoo
2014-02-07Onion_test should be now a bit less failure prone.irungentoo
2014-02-05Made onion test taste more like onion.irungentoo
2014-01-30Test passes now, uncommented it.irungentoo
2014-01-29A bit of tests added.irungentoo
2014-01-20Merge branch 'onion'irungentoo
2014-01-19proper windows preprocessor detectionBen Iofel
2014-01-19Fixed onion_test.irungentoo
2014-01-14Onion data packets can now be handled in onion_client.irungentoo
oniondata_registerhandler(...) can be used to register different packet types to handle them and send_onion_data(...) can be used to send these packets.
2014-01-09Putting the sendback outside the encrypted part of the response.irungentoo
It's more useful this way.
2014-01-08Fixed problem in onion_announce.cirungentoo
Added a way to know if a announce response is valid.
2014-01-06onion_announce seems to be working perfectly.irungentoo
Stuff added and fixed.
2014-01-05Tests added and some fixes for the onion part.irungentoo
2014-01-04Some work on the onion part done.irungentoo
2014-01-03A bit of work done on the onion part.irungentoo
2013-12-31Added onion.c to build system and added a test.irungentoo