diff options
author | erdgeist <> | 2009-01-02 08:57:53 +0000 |
---|---|---|
committer | erdgeist <> | 2009-01-02 08:57:53 +0000 |
commit | 2df09905f5540fee096d48a92cb0c42558498a12 (patch) | |
tree | 68eab61d29719400972485de395dd0465467aea6 /ot_mutex.h | |
parent | 548e2b8338b5ee8d24fa928e833f345bb5cb6f0e (diff) |
* 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.
Diffstat (limited to 'ot_mutex.h')
-rw-r--r-- | ot_mutex.h | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -14,8 +14,10 @@ void mutex_deinit( ); | |||
14 | ot_vector *mutex_bucket_lock( int bucket ); | 14 | ot_vector *mutex_bucket_lock( int bucket ); |
15 | ot_vector *mutex_bucket_lock_by_hash( ot_hash *hash ); | 15 | ot_vector *mutex_bucket_lock_by_hash( ot_hash *hash ); |
16 | 16 | ||
17 | void mutex_bucket_unlock( int bucket ); | 17 | void mutex_bucket_unlock( int bucket, int delta_torrentcount ); |
18 | void mutex_bucket_unlock_by_hash( ot_hash *hash ); | 18 | void mutex_bucket_unlock_by_hash( ot_hash *hash, int delta_torrentcount ); |
19 | |||
20 | size_t mutex_get_torrent_count(); | ||
19 | 21 | ||
20 | typedef enum { | 22 | typedef enum { |
21 | TASK_STATS_CONNS = 0x0001, | 23 | TASK_STATS_CONNS = 0x0001, |