summaryrefslogtreecommitdiff
path: root/ot_mutex.c
diff options
context:
space:
mode:
authorerdgeist <>2009-03-04 14:35:21 +0000
committererdgeist <>2009-03-04 14:35:21 +0000
commit9297967f8523f1ac22bbac1823529b970a07cf56 (patch)
tree0a6bc2a2d3ac9d38e53079040c7057c779e30f15 /ot_mutex.c
parent72a1564ca14392cc2e1d044554c6e86a0eda9409 (diff)
Add a stat option the count bucket stalls
Add an iterator for all torrents. It's slower but for stats it's okay. Move some stats collection stuff to the new iterator. More to come. Start a "report all stats" page. Start fixing the code to identify "busy" networks. Add the concept of hosts allowed to proxy. Add a parser for the X-Forwarded-For: HTTP header. Clean up HTTP Header handling code. (Remove some left overs of now vanished sync code).
Diffstat (limited to 'ot_mutex.c')
-rw-r--r--ot_mutex.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ot_mutex.c b/ot_mutex.c
index 925eb27..2052ffa 100644
--- a/ot_mutex.c
+++ b/ot_mutex.c
@@ -18,6 +18,7 @@
18/* Opentracker */ 18/* Opentracker */
19#include "trackerlogic.h" 19#include "trackerlogic.h"
20#include "ot_mutex.h" 20#include "ot_mutex.h"
21#include "ot_stats.h"
21 22
22/* #define MTX_DBG( STRING ) fprintf( stderr, STRING ) */ 23/* #define MTX_DBG( STRING ) fprintf( stderr, STRING ) */
23#define MTX_DBG( STRING ) 24#define MTX_DBG( STRING )
@@ -47,8 +48,10 @@ static int bucket_check( int bucket ) {
47 48
48 /* See, if bucket is already locked */ 49 /* See, if bucket is already locked */
49 for( i=0; i<bucket_locklist_count; ++i ) 50 for( i=0; i<bucket_locklist_count; ++i )
50 if( bucket_locklist[ i ] == bucket ) 51 if( bucket_locklist[ i ] == bucket ) {
52 stats_issue_event( EVENT_BUCKET_LOCKED, 0, 0 );
51 return -1; 53 return -1;
54 }
52 55
53 return 0; 56 return 0;
54} 57}