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
14 years ago
Dirk Engling
83d62ba0fb
Some premature optimization lead to always only 8bytes of ot_peers being copied
14 years ago
Dirk Engling
9b12b745ae
Make v4 and v6 modes v4/v6-ONLY
14 years ago
Dirk Engling
eb98ff8fe3
We sent an incorrect reply dictionary vor v6 announces
14 years ago
Dirk Engling
c6dd258244
fix parser
14 years ago
Dirk Engling
6337649b08
V6
14 years ago
Dirk Engling
b2ca164922
* http and udp routines now use thread local buffers passed in workstruct containers. In other words they do not use static_buffer anymore and are considered to be thread safe.
...
* the new workstruct also introduces a well defined buffer and result passing path
* a new function scan_find_keywords is a wrapper around scan_urlencoded_query that maps keys in url to values passed in an array of ot_keywords structs
* this new function cleans up much of url parameter parsing work, where read_ptr and write_ptr have been introduced rather than the confusing char *c, *data variables
* I now use memcmp instead of byte_diff to allow compiler to optimize constant size string compares
* got rid of UTORRENT_1600_WORKAROUND
* livesync_ticker is now only called from one (currently main) thread to avoid race conditions
14 years ago
Dirk Engling
823f93a96f
Make opentracker ANSI C again.
14 years ago
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.
14 years ago
Dirk Engling
621c8462be
Introduce new flag WANT_SYNC_SCRAPE
14 years ago
Dirk Engling
508e170d30
Fix incorrect prototype for accesslist_deinit
14 years ago
Dirk Engling
2cf9b92729
minor white space
14 years ago
Dirk Engling
ea4bff6bdc
minoe white space
14 years ago
Dirk Engling
e6ceb56796
Fix badly formed bencoded answer to stopped events
14 years ago
Dirk Engling
d0c417d9f3
Fix: Did not time stamp a torrent correctly, that once timed out and came back to life
14 years ago
Dirk Engling
6b57113bf0
Propose a scrape sync protocol.
14 years ago
Dirk Engling
343169385e
Make all torrents in their buckets sorted again.
14 years ago
Dirk Engling
32edd0dff8
Fix: auto increment in += is not a post increment...
14 years ago
Dirk Engling
3557e9edd7
Fix post increase on wrong pointer type.
14 years ago
Dirk Engling
efce908bbc
Used wrong variable as offset into hash to copy
14 years ago
Dirk Engling
04e5bac4c3
Handle program end more politely
14 years ago
Dirk Engling
675dad9b3a
Avoid cast warning on 64bit machines
14 years ago
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
14 years ago
Dirk Engling
95b6c3b498
Format for full scrapes was not parsed correctly.
14 years ago
Dirk Engling
cec9b44738
Make mutex_lock_bucket_by_hash generic to any OT_BUCKET_COUNT
14 years ago
Dirk Engling
d46a8a5d06
Forgot one define READ32
14 years ago
Dirk Engling
545dab2c18
Tidy up unnecessary includes
14 years ago
Dirk Engling
55af66acb2
Add specialized vector functions to handle peers in sorted lists
...
Assume that compare_size is a mulptiple of 4 in all non-specialized cases and load int32_t to compare.
14 years ago
Dirk Engling
efe40b2726
Let's give a damn about syntactical correctness of peer's http strings. It's too expensive on both sides to check and to reject.
14 years ago
Dirk Engling
d5caa5786b
Now enforce that peers do not come back before our interval by giving out a 'min interval' in responses.
14 years ago
Dirk Engling
d021d86940
printf is buffered, write not. Use printf for all.
14 years ago
Dirk Engling
69f4646df3
fix size of 0 issue
14 years ago
Dirk Engling
7eb5341c78
Add debug code to spot peers that come back too early
14 years ago
Dirk Engling
b8d15fe766
Add debug code to store peer id
14 years ago
Dirk Engling
a6afcf8ab8
New peer flag to see, whether peer came from announce or sync
14 years ago
Dirk Engling
384028829b
Aid spotting bad clients...
14 years ago
Denis Ahrens
8614b83456
stats fuer sync
14 years ago
Dirk Engling
dcf8454138
Live Sync for peers that do not come back too early.
14 years ago
Dirk Engling
c0dab929ab
The BIG refactoring [tm]. Too many changes to count them. If it doesn't suite you, revert to last version.
14 years ago
Dirk Engling
90217a63e5
Bugfix: Number of Pools << Number of Buckets
14 years ago
Dirk Engling
ca82945307
Try to use much less memory and hope for speedups
14 years ago
Dirk Engling
19dcaa82f5
Spread the amount of time spent in cleanup about 2 minutes
14 years ago
Dirk Engling
9384f6494b
Add stats about when peers renew their announces.
14 years ago
Dirk Engling
18d338ce40
Never let vectors shrink below their minimal capacity
14 years ago
Dirk Engling
49c5139acf
Formatting
14 years ago
Dirk Engling
c8daa7bf86
Add stats about when peers renew their announces.
14 years ago
Dirk Engling
7dcd727ce6
Whitespace fixes
14 years ago
Denis Ahrens
32477fb1ba
fixed typo
14 years ago
Dirk Engling
71b2ffcaa6
Fix stats parse code to allow modes with more than 4 characters. Wir wurden ja langsam zum Gespoett der Leute.
14 years ago
Dirk Engling
022f3e7455
First vector has size 1, not 0 in debug vector
14 years ago