summaryrefslogtreecommitdiff
path: root/ot_sync.c
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2008-10-04 05:40:48 +0000
committerDirk Engling <erdgeist@erdgeist.org>2008-10-04 05:40:48 +0000
commite076dab883f1cf3b949b7d1d22934965b37655f1 (patch)
treedd1b15bb61354854178284ac2e40e54f07a64e97 /ot_sync.c
parent76416b5c1c307718332b51b8682bd8a603071a02 (diff)
downloadopentracker-e076dab883f1cf3b949b7d1d22934965b37655f1.tar.gz
opentracker-e076dab883f1cf3b949b7d1d22934965b37655f1.zip
added live sync code
added a config file parser added tracker id changed WANT_CLOSED_TRACKER and WANT_BLACKLIST into WANT_ACCESS_WHITE and WANT_ACCESS_BLACK changed WANT_TRACKER_SYNC to WANT_SYNC_BATCH and added WANT_SYNC_LIVE added an option to switch off fullscrapes cleaned up many internal hardcoded values, like PROTO_FLAG,
Diffstat (limited to 'ot_sync.c')
-rw-r--r--ot_sync.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ot_sync.c b/ot_sync.c
index 4883931..b9303c9 100644
--- a/ot_sync.c
+++ b/ot_sync.c
@@ -23,7 +23,7 @@
#include "ot_stats.h"
#include "ot_iovec.h"
-#ifdef WANT_TRACKER_SYNC
+#ifdef WANT_SYNC_BATCH
#define OT_SYNC_CHUNK_SIZE (512*1024)
@@ -141,7 +141,7 @@ static void * sync_worker( void * args) {
ot_tasktype tasktype = TASK_SYNC_OUT;
ot_taskid taskid = mutex_workqueue_poptask( &tasktype );
sync_make( &iovec_entries, &iovector );
- stats_issue_event( EVENT_SYNC_OUT, 1, iovec_length( &iovec_entries, &iovector) );
+ stats_issue_event( EVENT_SYNC_OUT, FLAG_TCP, iovec_length( &iovec_entries, &iovector) );
if( mutex_workqueue_pushresult( taskid, iovec_entries, iovector ) )
iovec_free( &iovec_entries, &iovector );
}
@@ -163,4 +163,4 @@ void sync_deliver( int64 socket ) {
#endif
-const char *g_version_sync_c = "$Source: /home/cvsroot/opentracker/ot_sync.c,v $: $Revision: 1.5 $\n";
+const char *g_version_sync_c = "$Source: /home/cvsroot/opentracker/ot_sync.c,v $: $Revision: 1.6 $\n";