summaryrefslogtreecommitdiff
path: root/toxcore/assoc.c
AgeCommit message (Collapse)Author
2015-01-10Logger fixmannol
2014-08-30Merge branch 'myChan' of https://github.com/lobiCode/toxcoreirungentoo
2014-08-29added checking for null pointer in new_Assoc functionslaniCode
2014-06-20Fix CppCheck style errorsTux3 / Mlkj / !Lev.uXFMLA
#if 0 the content of toxav/msi.c : int stringify_message(MSIMessage *msg, char *dest) This function has no effect and does not seem to be used for actively waiting. Fix various other style errors, reduce scope when possible, avoid redundant writes, clarify operator priorities, etc.
2014-06-16fix func protoliuguangzhao
2014-06-15Astyled code.irungentoo
2014-06-13Const correctness for toxcore/assoc.cMarc Schütz
2014-06-01Fixed TOX_MAX_MESSAGE_LENGTH define.irungentoo
Removed some useless code from toxcore. Astyled core code with new version of astyle.
2014-05-25Merge branch 'mannol1-Multicalls' into multi-avirungentoo
2014-05-22Fixed nodes never being marked as usedMaxim Biro
2014-05-20Merge upstream and other stuffmannol
2014-04-27Yeah many callsmannol
2014-04-16multiple spelling fixesCarlos E. Garcia
2014-02-17astyled last commit.irungentoo
2014-02-16Replaced magic numbers inside candidates_create_internal() with enumerated listLehi Toskin
2013-12-13Merge pull request #678 from FullName/retipp-fixirungentoo
Fix a code cleanup.
2013-12-12Merge branch 'assoc-refresh-distant-data' of ↵irungentoo
https://github.com/FullName/ProjectTox-Core into FullName-assoc-refresh-distant-data
2013-12-11Fix a code cleanup.Coren[m]
DHT.c: - get_close_nodes(): - allow two 'indirect' nodes ('indirect' as in distant from us and therefore not tested regularly, "bad") - be consequent when testing for NULLed results, pack nodes_list dense - (logging) dump number of found entries from assoc - returnedip_ports(): - fix code cleanup, the entry to be added is about the node we were told, not about the node who told us assoc.c: - Assoc_get_close_entries(): break from loops as soon as a marking-invalid-node is hit
2013-12-08do_Assoc(): keep the data of the buckets somewhat currentCoren[m]
2013-12-07Added/updated some basic docs and cleaned up some things.irungentoo
2013-12-05Added a assoc test.irungentoo
Changed default assoc so that it behaves correctly.
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-24Fixed possible build problem.irungentoo
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.