Commit Graph

53 Commits

Author SHA1 Message Date
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
Dirk Engling 44cbe3de53 Make to_hex thread safe. Get rid off old /24 counting code. Protect more bucket accesses by locks. 2007-11-06 03:21:03 +00:00
Dirk Engling ee8369dbcf We do now use the tools for locking buckets in order to prepare MT code 2007-11-06 01:29:57 +00:00
Dirk Engling aa25c390dd Introducing first tools to make opentracker multithreaded. 2007-11-03 13:43:05 +00:00
Dirk Engling 472f8469d2 Introduce configuration dependent number of parameters in a nicer way 2007-11-02 13:13:03 +00:00
Dirk Engling 1b467d186c Allow for more than one admin ip address 2007-11-01 20:13:03 +00:00
Dirk Engling 66b21d1e28 Add more full scrape stats 2007-10-31 15:39:41 +00:00
Dirk Engling f37e510592 Reenabled syncing 2007-10-29 17:22:05 +00:00
Dirk Engling df30bc8484 Number of buckets is 1024 now
Clean all torrents now only cleans one bucket at a time
All torrents that are being worked upon in an announce are being cleaned on demoand
torrent's peer lists now keep extra counts for seeds and peers to speed up scrape and announce
Sync has gone for now. I will think up a new way to implement. The old one was way to slow.
2007-10-27 14:06:07 +00:00
Dirk Engling d3f8013a18 Introducing multiscrape 2007-10-19 21:56:59 +00:00
Dirk Engling 71436d6b24 After studying opentracker live data, I decided to radically reduce default allocation for vectors and making it grow faster instead: Most pools only had one or two peers, wasting 8*15 or 8*14 bytes. 2007-10-19 14:41:30 +00:00
Dirk Engling 6891fa78bc Increase check interval for timeouted sockets to 10 seconds. That may prevent some disrupted scrapes. 2007-10-19 01:27:23 +00:00
Dirk Engling b61651394a Increase send timeout. Also use an own variable for that. 2007-10-17 23:41:37 +00:00
Dirk Engling 7a3ddcfbce since gettimeofday is rather expansive, we do only fetch time once in a 5 second period, when we are delivered a SIGALRM. 2007-10-13 17:40:37 +00:00
Dirk Engling b3f834951c make 64bit safe 2007-10-12 21:57:10 +00:00
Dirk Engling 4319defc9c New stats for s24s code, this is debug, do not use in real world 2007-09-26 16:49:13 +00:00
Dirk Engling c863c6e108 An announce with event=stopped now returns correct number of leechers and seeders. In TCP and UDP. 2007-09-10 02:43:10 +00:00
Dirk Engling d58db69d9a Added whitelisting to reimplement the WANT_CLOSED_TRACKER functionality 2007-08-18 09:56:22 +00:00
Dirk Engling 6382386416 some subnet stats... still ugly and untested. 2007-07-22 16:17:26 +00:00
Dirk Engling 8ef59b0351 * fixed "nobody " -> "nobody" fuckup when getpwnam-ing
* implemented basic blacklisting:
** the file specified with -b <BLACKLIST> is read and added to a blacklist vector
** if an announce hits a torrent in that blacklist vector, add_peer_to_torrent fails
** sending a SIGHUP to the program forces it to reread the blacklists
** the server returns with a 500, which is not exactly nice but does the job for now
** an adaequat "failure reason:" should be delivered... TODO
2007-07-22 00:40:10 +00:00
Dirk Engling cb90c27b28 Added inbound part of sync. This also meant to remove the black/whitelisting as we did by now. A more scalable way to blacklist will follow. 2007-03-27 16:09:03 +00:00
Dirk Engling 2a646cf4a0 Added outbound part of sync Proposed format: d4:syncd20:<info_hash>8*N:(xxxxyy)*Nee, therefore had to refactor torrent cleanup now that it will hit all torrents once every OT_POOL_TIMEOUT units. 2007-03-27 12:07:29 +00:00
Denis Ahrens b3f72c444b support for udp scrape 2007-03-16 22:46:41 +00:00
Denis Ahrens a45648f301 new modes for udp4 and tcp4 stats 2007-03-15 23:14:14 +00:00
Dirk Engling 622e34f2b0 udp is working in theory, return_peers_for_torrent accepts a switch to request an udp answer. Fixed prototypes. 2007-03-06 19:43:47 +00:00
Denis Ahrens 3409074dc0 increased the interval random variation 2007-02-02 23:37:28 +00:00
Denis Ahrens 4cebf91d22 make the interval with random an average value around the real value and not additional 2007-02-01 22:34:23 +00:00
Dirk Engling 48d0196995 Make timeouts more human readable 2007-02-01 22:27:44 +00:00
Dirk Engling f545ad8774 Wasted too much space for minimum element count. Now minimum elements in vektor is 16, it grows and shrinks by a factor of 4 and a shrinking hysteresis of a factor of 5 2007-02-01 16:06:17 +00:00
Dirk Engling b0eee67849 el cheapo vector debugging 2007-02-01 13:51:39 +00:00
Dirk Engling 47eaad59df On linux time.h must be included to use time() 2007-01-30 21:29:08 +00:00
Dirk Engling 342e3a25c0 account downloaded before early returns 2007-01-27 16:06:13 +00:00
Dirk Engling 96e5b5a076 Introduce another unspec'd command: sync which syncs the most recent peer pool for a torrent out. Do some variable type clean up. Do some code structure clean up. 2007-01-26 16:26:49 +00:00
Dirk Engling 0f85392889 return random check back intervals to our clients 2007-01-25 14:16:26 +00:00
Dirk Engling c5d5867900 Full scrape, kinda tested 2007-01-20 11:13:30 +00:00
Dirk Engling f05ed877ed From now the OT_CLIENT_TIMEOUT will be enforced, even if some data arrived inside this interval 2007-01-18 13:06:49 +00:00
Dirk Engling ddd1609efd Simple top5 by peers/seeders table 2007-01-17 17:39:36 +00:00
Dirk Engling f51335b9b8 Rudimentary stats 2007-01-16 02:57:32 +00:00
Dirk Engling afa05fad96 Documentation improved, some reindenting (again), variable types checked, unnecessary defines removed 2007-01-11 01:06:10 +00:00
Dirk Engling 9957e9ea1f Be more helpful 2007-01-05 13:00:05 +00:00
Dirk Engling 1c97e9cd8c added closed tracker and blacklist code 2007-01-05 12:25:44 +00:00
Dirk Engling a3ac795bec README\! 2007-01-05 00:00:41 +00:00
Dirk Engling e8100db396 simplified binary_search, it always does a memcmp. began to implement dump knowledge 2007-01-04 16:14:21 +00:00
Dirk Engling aa444b6e18 Added option to get ip from query string + parser, fixed two bugs concerning grow/shrink of vectors. Now cleans up a torrent BEFORE trying to remove a peer -> this may remove peer already and must be done anyway. 2007-01-03 05:11:48 +00:00
Dirk Engling f10cd3e42b Fix port again ;) Include headers in Makefile dependencies 2006-12-15 23:38:18 +00:00
Dirk Engling cb91882c6c fixed setport fuckup 2006-12-15 23:35:40 +00:00
Dirk Engling dd3589f57e Make code endianess save 2006-12-15 23:28:23 +00:00
Dirk Engling 7d1d51cc05 Now actually seems to work for the most parts
Added scraping
Added graceful disconnect
2006-12-14 02:44:50 +00:00
Dirk Engling 95f6864f4f Trackerlogic done... not tested yet 2006-12-13 02:44:39 +00:00
Dirk Engling 2039029366 This is a complete rewrite... assume nothing works. 2006-12-12 02:37:18 +00:00