summaryrefslogtreecommitdiff
path: root/toxcore/Messenger.c
AgeCommit message (Collapse)Author
2016-08-22Make Message received receipts statelessGregory Mullen (grayhatter)
2016-08-22Make Friend User Status statelessGregory Mullen (grayhatter)
2016-08-20Make the friend message callback statelessGregory Mullen (grayhatter)
2016-08-19Make Typing change callback statelessGregory Mullen (grayhatter)
Moved a few #defines to the top of the header for better readability
2016-08-18Make friend_status_message callback stateless.iphydf
See #40 for details.
2016-08-18Make tox_callback_friend_name stateless.iphydf
See #27 and #40 for details.
2016-08-17Add missing DHT_bootstrap to CMakeLists.txt.iphydf
- This PR also adds a DEBUG cmake option that enables -DTOX_DEBUG. - We also remove `-Wall`, because there are too many warnings, and nobody really looks at them at the moment. We'll see about fixing them soon. We'll also want to enable `-Werror` at some point. - Finally, this PR enables `-O3` to make sure toxcore still works correctly under heavy compiler optimisations.
2016-08-17Make self_connection_status callback stateless.iphydf
**What are we doing?** We are moving towards stateless callbacks. This means that when registering a callback, you no longer pass a user data pointer. Instead, you pass a user data pointer to tox_iterate. This pointer is threaded through the code, passed to each callback. The callback can modify the data pointed at. An extra indirection will be needed if the pointer itself can change. **Why?** Currently, callbacks are registered with a user data pointer. This means the library has N pointers for N different callbacks. These pointers need to be managed by the client code. Managing the lifetime of the pointee can be difficult. In C++, it takes special effort to ensure that the lifetime of user data extends at least beyond the lifetime of the Tox instance. For other languages, the situation is much worse. Java and other garbage collected languages may move objects in memory, so the pointers are not stable. Tox4j goes through a lot of effort to make the Java/Scala user experience a pleasant one by keeping a global array of Tox+userdata on the C++ side, and communicating via protobufs. A Haskell FFI would have to do similarly complex tricks. Stateless callbacks ensure that a user data pointer only needs to live during a single function call. This means that the user code (or language runtime) can move the data around at will, as long as it sets the new location in the callback. **How?** We are doing this change one callback at a time. After each callback, we ensure that everything still works as expected. This means the toxcore change will require 15 Pull Requests.
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-10-23Prevent seek equal to size of file transfer so that toxcore respects what ↵irungentoo
the docs say.
2015-10-23Fix PACKET_ID_OFFLINE fallinthrough PACKET_ID_NICKNAMEtux3
This fixes the PACKET_ID_OFFLINE handling code incorrectly falling through to the PACKET_ID_NICKNAME handling code This bug resulted in a friend B's name being wiped on friend A's client after B removes A Fixes tux3/qTox#1967 Fixes #1426
2015-10-10New Adaptive BR algorithm, cleanups and fixesEniz Vukovic
2015-08-03Remove useless var.irungentoo
2015-08-02Save fixes.irungentoo
2015-07-29client_id -> public_keyirungentoo
2015-07-23Save important parts of save first.irungentoo
This might reduce the likelyness of broken saves.
2015-07-22Fixed bug.irungentoo
2015-07-21Fixed bug.irungentoo
2015-07-19Pack onion path nodes in save.irungentoo
2015-07-17Allow savedata to be slightly smaller than the allocated buffer.irungentoo
2015-07-16Pack connected TCP relay nodes.irungentoo
2015-07-11Tell A/V that friend is offline when friend is deleted.irungentoo
2015-07-08Fix segfault caused by cleanup functions in wrong orderJfreegman
2015-06-30Allow sending data after file is paused.irungentoo
Dissallow sending non requested data.
2015-06-28Removed useless parameter from new_TCP_server()irungentoo
2015-06-22Fixed warning.irungentoo
2015-05-26Fixed rare bug where userstatus, name, etc... would not be sent to friend.irungentoo
2015-05-26Fixed bug when deleting friend that we are connected to in group chat.irungentoo
2015-05-21Load only secret key from tox save, not public key.irungentoo
Calculate public key from it.
2015-05-14Added tcp test.irungentoo
2015-05-12Connect to own TCP server if hosting one.irungentoo
Removed useless code.
2015-05-08Added basic TCP server hosting to tox.h api.irungentoo
TODO: tell friends we are hosting a relay and prioritize using relays hosted by friends over bootstrap ones.
2015-05-03Removed useless code.irungentoo
2015-04-27Move LAN discovery from Messenger to friend_connection.irungentoo
2015-04-24Fixed a couple possible issues with the friend connection callback.irungentoo
A TCP callback could be received when only a UDP connection was present. Increased a UDP timeout to make it less likely to time out and switch to TCP.
2015-04-21Move the send tcp relay packet from Messenger to friend connection.irungentoo
2015-04-18Some messenger fixes.irungentoo
2015-04-16Properly share connected relays and connect to the friend correctlyirungentoo
with them.
2015-04-16Store TCP relays tied to friend and reconnect to some when reconnecting.irungentoo
2015-04-05Fixed typo.irungentoo
2015-04-03File transfer fixes.irungentoo
Don't allow non transferring files to be paused and then resumed starting the file transfer.
2015-04-02API function to get last seen timestamp of friendJfreegman
also removed remnants of the no longer used variable ping_lastrecv
2015-03-30Removed unused variable.irungentoo
2015-03-27Fixed file transfer bug.irungentoo
This should have been at the beginning of the loop, not the end.
2015-03-23Added some more checks for file packets.irungentoo
2015-03-21Transfers with filelength == 0 now behave exactly like transfers of everyirungentoo
other size (except streaming of course).
2015-03-20Allow sending of file transfer requests with length 0 but don't allocateirungentoo
any file number for them in core. These can be used to tell friends we don't have an avatar set or to unset a set avatar.
2015-03-20For file transfers UINT64_MAX is now used as the size for streamingirungentoo
transfers instead of 0. For avatar transfers file size 0 now means that the client has no avatar set. Added a test for streaming transfers.
2015-03-18Merged normal message function and send action function into oneirungentoo
messaging function. This removes code duplication and allows us to easily add new message types to the api without having to add new functions.
2015-03-17Kill all file transfers associated with the friend when friend goesirungentoo
offline.