Commit Graph

19 Commits

Author SHA1 Message Date
Dirk Engling 9357435207 Formatting 2009-02-20 12:23:59 +00:00
Dirk Engling 0987307ea3 Add comments, rename our struct http_data h to cookie, all clientsockets to sock, all size_t from socket_recvs to byte_count. Make signal handler set default handler for the second SIGINT 2009-01-15 23:01:36 +00:00
Dirk Engling 83d62ba0fb Some premature optimization lead to always only 8bytes of ot_peers being copied 2009-01-15 22:10:54 +00:00
Dirk Engling 49ec59cbbe * opentracker now drops permissions in correct order and really chroots() if ran as root
* lock passing between add_peer_to_torrent and return_peers_for_torrent is now avoided by providing a more general add_peer_to_torrent_and_return_peers function that can be used with NULL parameters to not return any peers (in sync case)
* in order to keep a fast overview how many torrents opentracker maintains, every mutex_bucket_unlock operation expects an additional integer parameter that tells ot_mutex.c how many torrents have been added or removed. A function mutex_get_torrent_count has been introduced.
2009-01-02 08:57:49 +00:00
Dirk Engling 04e5bac4c3 Handle program end more politely 2008-12-07 03:50:47 +00:00
Dirk Engling fa6c870315 Renamed OT_FLAG to OT_PEERFLAG to make code easier to read
Introduced READ16/32 and WRITE16/32 makros to abstract loading/storing from unaligned addresses away on cpu's that can actually load/store everywhere
Removed all unnecessary memmoves, especially where it only moved 6 bytes in inner loop. I replaced them with WRITE16/32(READ16/32()) makros
2008-12-06 18:45:59 +00:00
Dirk Engling 545dab2c18 Tidy up unnecessary includes 2008-12-05 21:28:40 +00:00
Dirk Engling c0dab929ab The BIG refactoring [tm]. Too many changes to count them. If it doesn't suite you, revert to last version. 2008-11-28 22:21:09 +00:00
Dirk Engling 19dcaa82f5 Spread the amount of time spent in cleanup about 2 minutes 2008-11-03 01:52:23 +00:00
Dirk Engling 7dcd727ce6 Whitespace fixes 2008-10-28 01:27:21 +00:00
Dirk Engling 14f0a3ceea Reverting last commit. Debug effect not seen. 2008-10-07 23:53:29 +00:00
Dirk Engling ad7c574c0e allow threads to be named. not posix compliant. 2008-10-07 23:44:59 +00:00
Dirk Engling e076dab883 added live sync code
added a config file parser
added tracker id
added an option to switch off fullscrapes

cleaned up many internal hardcoded values, like PROTO_FLAG,
2008-10-04 05:40:48 +00:00
Dirk Engling e767fae72a Introduce some kind of versioning 2007-12-20 05:59:34 +00:00
Dirk Engling 7df4ce8fc7 Simplify includes 2007-12-03 00:49:24 +00:00
Dirk Engling 191c88394b Make clean_single_torrent return much faster, if nothing is to do 2007-11-20 02:22:21 +00:00
Dirk Engling 032224f150 Cleanup now moved to its own thread, too 2007-11-19 21:10:53 +00:00
Dirk Engling c718b15168 Fixed warnings about newlines at end of file 2007-11-06 12:03:11 +00:00
Dirk Engling fed78043a6 No one can get access to buckets now without locking them. Also split up the trackerlogic.c-monster in functional sub-units. HEADS UP: this code is untested and not considered stable. 2007-11-06 11:58:12 +00:00