summaryrefslogtreecommitdiff
path: root/toxcore/Messenger.c
AgeCommit message (Collapse)Author
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
2013-09-11Integration of group chats into messenger in progress.irungentoo
2013-09-11Messenger.c:Coren[m]
- unbroke Messenger_load(): lost a length adjustment - addeditional check for enough data available
2013-09-10util.*:Coren[m]
- 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)
2013-09-10big push, putting all the infrastructure in place behind TOX_ENABLE_IPV6Coren[m]
2013-09-09Merge branch 'master' into IntegrationCoren[m]
2013-09-09tox.*, Messenger.*:Coren[m]
- initialisation: argument added to enable/disable ipv6 as socket Messenger_test.c: - initialisation: ipv4 hardcoded for now - delegating IP resolution to DHT_bootstrap_ex()
2013-09-09network.h:Coren[m]
- IP: add in_addr_t as part of the union - IP: rename IP to IP4
2013-09-09wrong typeJfreegman
2013-09-09a better wayJfreegman
2013-09-09initialize name_lengthJfreegman
2013-09-07Removed friendstatus from client APIMaxim Biro
2013-09-07Merge branch 'master' of https://github.com/irungentoo/ProjectTox-Coreirungentoo
2013-09-07Added TODO list and made m_copy*_statusmessage functions return length of ↵irungentoo
copied buffer on success.