summaryrefslogtreecommitdiff
path: root/toxcore/friend_connection.c
AgeCommit message (Collapse)Author
2018-01-16Use apidsl to generate LAN_discovery.h.iphydf
2018-01-14Make Friend_Connections a module-private type.iphydf
2018-01-14Make Onion_Client a module-private type.iphydf
2018-01-10Fix formatting in some C files.iphydf
Also replace &(x) with &x for consistency.
2017-11-20forget DHT pubkey of offline friend after DHT timeoutzugz
2017-10-04Improve LAN discoveryDiadlo
Issue: If another tox instance started on the not default port, LAN discovery will be failed. Now tox will iterate though all possible ports to find another tox instances.
2017-08-24AF_INET -> TOX_AF_INETDiadlo
2017-02-26Add part of platform-independent network API implementationDiadlo
socket -> net_socket htons -> net_htons htonl -> net_htonl connect -> net_connect sendto -> net_sendto_ip4 getaddrinfo -> net_getipport sa_family_t -> Family
2017-01-28Add VLA compatibility macro for C89-ish compilers.iphydf
2017-01-19Update license headers and remove redundant file name comment.iphydf
"All rights reserved" was incorrect. The project was licensed under GPL3, which means a lot of rights are licensed to everybody in the world, i.e. not reserved to the "Tox Project".
2016-12-22Wrap all sodium/nacl functions in crypto_core.c.iphydf
2016-12-14Add option to disable local peer discoveryMaxim Biro
2016-09-27Remove redundant callback objects.iphydf
These three objects and their callback IDs are always the same.
2016-09-24Make toxcore code C++ compatible.iphydf
It is still C code, so still compatible with C compilers as well. This change lets us see more clearly where implicit conversions occur by making them explicit.
2016-09-13Use <stdbool.h> and replace _Bool with bool.iphydf
This header is a requirement for the public API, therefore is assumed to exist. It is a C99 standard library header, and _Bool is not intended to be used directly, except in legacy code that defines bool (and true/false) itself. We don't use or depend on such code. None of our client code uses or depends on such code. There is no reason to not use bool.
2016-09-13Group #include directives in 3-4 groups.iphydf
1. Current module (if C file). 2. Headers from current library. 3. Headers from other library (e.g. toxcore includes in toxav). 4. System headers.
2016-09-10make the majority of the callbacks stateless and add some status to a testcasemichael bishop
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-05Make packet data a ptr-to-const.iphydf
Ensure that nobody inadvertly modifies the temporary packet data buffer.
2016-09-02Do not use `else` after `return`.iphydf
http://llvm.org/docs/CodingStandards.html#use-early-exits-and-continue-to-simplify-code
2016-08-31Add braces to all if statements.iphydf
2016-08-18Make tox_callback_friend_name stateless.iphydf
See #27 and #40 for details.
2016-01-27 fix: compare sensitive data with sodium_memcmpRoman Proskuryakov
fix: make increment_nonce & increment_nonce_number independent of user-controlled input fix: make crypto_core more stable agains null ptr dereference
2015-06-15Fixed warning.irungentoo
2015-05-19Some fixes.irungentoo
2015-05-18If we get the ip/port of a relay on a local ip, assume that our friendirungentoo
is hosting a relay on his ip.
2015-05-04Fixed possible connection issue.irungentoo
2015-04-27Move LAN discovery from Messenger to friend_connection.irungentoo
2015-04-26Fixed one case of the connection callback not getting called on reconnection.irungentoo
2015-04-21Move the send tcp relay packet from Messenger to friend connection.irungentoo
2015-04-18Some changes to net crypto.irungentoo
Should fix certain connection issues that sometimes happen. The dht public key of the peer must be known to create the connection. If the dht pk of the peer changes when a connection is active, it is killed to make way for the new one.
2015-04-16Store TCP relays tied to friend and reconnect to some when reconnecting.irungentoo
2015-04-03Fixed offline callback being called when connection timed out and diedirungentoo
without ever actually being connected.
2014-12-25Fixed bug.irungentoo
Set friend in onion as offline when friend goes offline.
2014-12-11Fixed crash when connection was killed during the packet callback.irungentoo
2014-12-02Only copy when pointer isn't NULL in get_friendcon_public_keys().irungentoo
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-10-04Send friend request with connection if for some reason (groupchats) weirungentoo
are already connected to the friend but they have not added us yet.
2014-10-01Group chats now actually work somewhat.irungentoo
2014-09-30Added some functions to friend_connection.irungentoo
2014-09-27Moved all the connection stuff from messenger to friend_connection.irungentoo
Messenger was doing way do many things. friend_connection takes care of finding and establishing a connection to friends.