Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
Saves should now be portable from big endian to little endian systems
though I need someone to actually test it to be sure I didn't mess up.
|
|
Now we can also remove the helper routines from toxcore/util.[ch].
|
|
|
|
|
|
|
|
|
|
|
|
No functionality changed.
|
|
Also removed some old, useless loading code.
|
|
cleanup_unix_time_id_eq_cpy_is_timeout
Conflicts:
toxcore/net_crypto.c
|
|
|
|
unix_time():
- returns local value for current epoch
- value is updated explicitly with unix_time_update() called at new_DHT()/doMessenger()/do_DHT()
is_timeout():
- uses the local value for current epoch
id_cpy()/id_eq() => id_copy()/id_equal():
- centralized duplicate definitions
- replaced (most) memcpy()/memcmp() of (*, *, CLIENT_ID_SIZE) with id_copy()/id_equal()
|
|
|
|
Compilerflag: CLIENT_ONETOONE_IP (to define in DHT.h, default unset i.e. NEW case: two addresses)
Every function in DHT{_test}.c working on Client_data has been rewritten to store IPv4 addresses in assoc4, IPv6 addresses in assoc6.
Loading/Storing of states defined with other compiler switch is transparently adjusting to the differences.
DHT.h, DHT.c:
- introduction and handling of the structure changes
DHT_test.c, Messenger.c:
- logging adapted to new structures
util.h:
- LOGGING isn't undefined per default anymore
|
|
|
|
Conflicts:
toxcore/Messenger.c
toxcore/util.c
toxcore/util.h
|
|
65536) friends...
|
|
Primary rationale: The part that DHT saves changes if IP is expanded to IPv6. To let people keep their friends/name, change the datafile format now, while everybody is still on the same page.
Loading/Saving rewritten to allow a part of the file to be incomprehensible to the loading routine.
Added a magic cookie at the beginning to mark the file as tox's.
Changes in some part of the datafile can be skipped and the remaining parts still be consumed.
Allows a wide margin of forward compatibility (like the IP to IPv6 transition, but also e.g. a change in the key format).
As long as the file is not completely garbled, the routine will read as much as possible. Only the KEY section is considered mandatory: a malformed key section leads to a negative result.
util.*:
- holds the driving function which jumps from section to section and calls back with section length and tag (type)
Messenger.c,DHT.*:
- new loading functions call the util-function with a callback, which subsequently consumes the sections
- old routines are kept to fall back onto if the magic cookie at the beginning isn't present
- saving is still done in one local routine
|
|
- moved cmdline_parsefor_ipv46() to testing/misc_tools.c
|
|
|
|
- return to the caller if the string could be resolved into an IP
other/DHT_bootstrap.c, testing/*_test.c, testing/nTox.c:
- parse cmdline for --ipv4/--ipv6 switch to allow user a choice
util.h:
- proper old-style C-comment
|
|
- added logging functions, default off
tox.h:
- added includes for sockaddr_in/6
network.c:
- added logging functions, default off (#define in util.h)
- IPv6: activating site-local all-nodes multicast address (i.e. IPv6 equivalent of broadcast)
|
|
|
|
They were causing problems on certain compiler configurations.
|
|
While doing the checks configure might generate "core" files and will
then try to remove them. Having a "core" directory generates an error
while runing the configure script.
There's no workaround but to rename the core directory.
|