summaryrefslogtreecommitdiff
path: root/toxcore/Messenger.c
AgeCommit message (Collapse)Author
2013-10-01Core now takes better care of file transfers.irungentoo
2013-09-30File sending.irungentoo
2013-09-28Fixed possible bug.irungentoo
2013-09-27Astyled the code.irungentoo
2013-09-27Merge branch 'ClientData46' of https://github.com/FullName/ProjectTox-Core ↵irungentoo
into FullName-ClientData46
2013-09-27Logging loop corrected.Coren[m]
2013-09-27Permit -Wshadow as useful warning.Coren[m]
2013-09-27expanded Client_data to hold two addresses (IPv4, IPv6) instead of oneCoren[m]
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
2013-09-24Possible bug fixed.irungentoo
2013-09-24Merge pull request #604 from JFreegman/masterirungentoo
made setfriendname() part of public api
2013-09-23check length of nameJfreegman
2013-09-23Fixed typo.irungentoo
2013-09-23made setfriendname part of public apiJfreegman
2013-09-22Fix typo. "if (yesno != 0 || yesno != 1)" always trueMaks
2013-09-22Merge branch 'master' of https://github.com/irungentoo/ProjectTox-Coreirungentoo
2013-09-22Keep the code consistent.irungentoo
2013-09-22Merge branch 'patch-9001' of https://github.com/stal888/ProjectTox-Core into ↵irungentoo
stal888-patch-9001
2013-09-22Merge pull request #600 from Jman012/masterirungentoo
Fixed a bug or two.
2013-09-22Fixed the connection bug and cleaned up some stuff.irungentoo
2013-09-21Fixed a bug or two.Jman012
Added breaks on the new packet handlers in doFriends for the switch statement, and added a default.
2013-09-21Fix bug.irungentoo
2013-09-21Fixed bug.irungentoo
2013-09-21Change tox_get_friendlist API.Sebastian Stal
tox_get_friendlist() -> tox_copy_friendlist(). You now have to allocate your own memory to pass into tox_copy_friendlist. To help with this, tox_count_friendlist() has been added to get the length of the friend list.
2013-09-21Thou shalt not take singular commands after an if into #ifdef DEBUG...Coren[m]
toxcore/Messenger.c: - Messenger_load_old(): brackets around an #ifdef'ed line to avoid data pointer being only pushed forward properly in the error case
2013-09-17Merge branch 'group-chat'irungentoo
2013-09-17astyled everything.irungentoo
2013-09-17numchats needs to be decrementedJfreegman
2013-09-16Functions to get name of peer in group chat added.irungentoo
Group message callback modified.
2013-09-17Merge remote-tracking branch 'upstream/master' into MessengerLoadSaveCoren[m]
2013-09-17Tests of state loading/saving lead to two fixes for DHT.c and util.cCoren[m]
util.c: - fix in empty section at the end of the state, showed as bug when having an empty name DHT.c: - fix in saving less data than originally announced, showed as bug when not having reached any clients ever (no clients or only with timestamp of zero)
2013-09-16Fixed build.irungentoo
2013-09-16Toxcore should never print anything when built normally.irungentoo
2013-09-16Merge pull request #576 from FullName/MessengerLoadSaveirungentoo
State loading/saving: Instead of a blob, segment into sections marked with tags.
2013-09-16Fix warnings of -Wall -WextraCoren[m]
2013-09-16additional length >= size checksCoren[m]
Messenger.c: - additional size checks - removed one pointless copying of data, instead using it directly util.c: - lost a newline vs. master
2013-09-16Merge remote-tracking branch 'upstream/master' into MessengerLoadSaveCoren[m]
Conflicts: toxcore/Messenger.c toxcore/util.c toxcore/util.h
2013-09-14astyled everything.irungentoo
2013-09-14DHT.c:Coren[m]
- get_close_nodes()/sendnodes()/sendnodes_ipv6(): when selecting for SEND_NODES/SEND_NODES_IPV6, treat embedded IPv4-in-IPv6 addresses as being IPv4 Messenger.c: - added a named constant for sixty seconds friend/client dump - fix logging to convert client_id to printable before printing
2013-09-14Change sublength to 32 bits. Someone might have more than (sizeof(Friends) / ↵Coren[m]
65536) friends...
2013-09-13Merge remote-tracking branch 'upstream/master' into MessengerLoadSaveCoren[m]
2013-09-13State loading/saving: Instead of a blob, segment into sections marked with tags.Coren[m]
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
2013-09-13Merge remote-tracking branch 'upstream/master' into IntegrationCoren[m]
2013-09-13TOX_ENABLE_IPV6 is now #define'd per default. Added some logging and error ↵Coren[m]
messages.
2013-09-12Merge branch 'master' of https://github.com/irungentoo/ProjectTox-Coreirungentoo
2013-09-12Very basic group chats, tested and working with nTox.irungentoo
Please wait until the tox.h API is updated before integrating it into your clients. nTox: /g creates a new group chat /i friendnum groupnum invite friendnum to groupnum /z groupnum message send message to groupnum NOTE: group chats currenly might not handle packet loss well if there are less than 6 participants.
2013-09-12Merge remote-tracking branch 'upstream/master' into IntegrationCoren[m]
Conflicts resolved: toxcore/Messenger.c toxcore/network.h
2013-09-12Merge remote-tracking branch 'upstream/master' into DHT_bootstrapCoren[m]
Conflicts: toxcore/Messenger.c
2013-09-12Patch to allow DHT_bootstrap to also do LAN discovery.Coren[m]
This patch inserts LAN discovery in DHT_bootstrap, allowing it to find clients even if it's run parameterless (and clients don't connect to it directly, e.g. because the port is already bound to a different client). - moves the #define of LAN_DISCOVERY_INTERVAL from Messenger.c to LAN_discovery.h - includes LAN_discovery.h into DHT_bootstrap.c - DHT_bootstrap.c sends and accepts LAN_discovery packets
2013-09-12network.*:Coren[m]
- addr_resolv(_or_parse_ip)(): added an optional parameter to return both an IPv6 and an IPv4 address if requested address family was AF_UNSPEC - logging of unhandled packets DHT.c: - bootstrap_from_address(): use the additional return from addr_resolv_or_parse_ip() to bootstrap in both network types at once Lossless_UDP_testclient.c: - main(): adapt to signature change of addr_resolve() Messenger.c. LAN_discovery.h: - lost a htons(), readded - moved LAN_DISCOVERY_INTERVAL #define into LAN_discovery.h LAN_discovery.c: - added IPv4-in-IPv6 local address test
2013-09-12Messenger.c:Coren[m]
- remove local PORT definition in favor of TOX_PORT_DEFAULT