summaryrefslogtreecommitdiff
path: root/toxcore/assoc.h
AgeCommit message (Collapse)Author
2016-11-06Remove assocendoffile78
2016-09-30Remove return after no-return situation (and other cleanups).iphydf
Cleanups: - Fix header guards to not use reserved names. - Avoid name shadowing. - Removed an unused variable found by avoiding name shadowing.
2016-09-08Fix potential null pointer dereference.iphydf
This used to not be an issue, but now that the logger is no longer global, not all source locations may have access to it.
2016-09-01Match parameter names in declarations with their definitions.iphydf
The parameter names were taken from function definitions to update the names in function declarations (prototypes).
2016-08-30Add missing #includes to headers and rename tox_old to tox_group.iphydf
Also, no longer #include the group code into tox.c. Instead, compile it separately in tox_group.c. This is a bit less surprising to someone looking around the code. Having some implementations in a .h file is certainly a bit surprising to a disciplined C programmer, especially when there is no technical reason to do it.
2016-08-27Move logging to a callback.iphydf
This removes the global logger (which by the way was deleted when the first tox was killed, so other toxes would then stop logging). Various bits of the code now carry a logger or pass it around. It's a bit less transparent now, but now there is no need to have a global logger, and clients can decide what to log and where.
2015-10-10New Adaptive BR algorithm, cleanups and fixesEniz Vukovic
2014-06-15Astyled code.irungentoo
2014-06-13Const correctness for toxcore/assoc.cMarc Schütz
2014-04-27Yeah many callsmannol
2014-02-16Replaced magic numbers inside candidates_create_internal() with enumerated listLehi Toskin
2013-12-12Merge branch 'assoc-refresh-distant-data' of ↵irungentoo
https://github.com/FullName/ProjectTox-Core into FullName-assoc-refresh-distant-data
2013-12-08do_Assoc(): keep the data of the buckets somewhat currentCoren[m]
2013-12-05Merge branch 'sendnodes-with-assoc' of ↵irungentoo
https://github.com/FullName/ProjectTox-Core into FullName-sendnodes-with-assoc
2013-12-03get_close_nodes(): make use of assoc to find some really close nodesCoren[m]
DHT.c: - get_close_nodes(): use assoc to find nodes for the requested reference id - handle_sendnodes*(): set a proper timestamp for "heard" nodes assoc.*: - expand Assoc_close_entries by flags for additional restrictions for search - Assoc_get_close_entries(): honor the new flags - new_Assoc() prime handling: min. prime is now 5 instead of 3, and up to 25 is handled directly - Assoc_status(): added address family for seen/heard, print of hash is now fixed width
2013-12-01fix 'typedef redefinition' build errors on older gcc versionsalexandervdm
building toxcore
2013-11-17Assoc's array is now allocated dynamically and per default much smaller (320 ↵Coren[m]
entries). id_hash() was not at all working as expected for very small bucket size (when (size / 4) was zero). Simplified to be trivially correct. Also added a used flag on adding an entry, which is set by callers if they have that association in active use. Those get priority over unused entries on collision. Fleshed out test to be at least elementary useful. Each group chat now uses an own, small assoc (80 entries).
2013-11-14Significantly trimmed down version of an ID<=>IP cache.Coren[m]
Besides acknowledging timeouts, the module isn't trying to do anything fancy with the data besides storing and retrieving.