summaryrefslogtreecommitdiff
path: root/ot_sync.c
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2007-12-03 00:49:24 +0000
committerDirk Engling <erdgeist@erdgeist.org>2007-12-03 00:49:24 +0000
commit7df4ce8fc7388702ce11141af4f2d6e92e1bfcf9 (patch)
tree5806ac813d1e2c1abec5de95df5feadd0be4e4d5 /ot_sync.c
parentd577adc79bcacf03b0b9a8c0525b0eb08cebc322 (diff)
downloadopentracker-7df4ce8fc7388702ce11141af4f2d6e92e1bfcf9.tar.gz
opentracker-7df4ce8fc7388702ce11141af4f2d6e92e1bfcf9.zip
Simplify includes
Diffstat (limited to 'ot_sync.c')
-rw-r--r--ot_sync.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/ot_sync.c b/ot_sync.c
index 6964098..ac1664d 100644
--- a/ot_sync.c
+++ b/ot_sync.c
@@ -4,6 +4,7 @@
/* System */
#include <sys/types.h>
#include <sys/mman.h>
+#include <sys/uio.h>
#include <stdio.h>
#include <string.h>
#include <pthread.h>
@@ -11,11 +12,14 @@
/* Libowfat */
#include "scan.h"
#include "byte.h"
+#include "io.h"
/* Opentracker */
#include "trackerlogic.h"
#include "ot_mutex.h"
#include "ot_sync.h"
+#include "ot_stats.h"
+#include "ot_iovec.h"
#ifdef WANT_TRACKER_SYNC
@@ -25,9 +29,9 @@
format: d4:syncd[..]ee
[..]: ( 20:01234567890abcdefghij16:XXXXYYYY )+
*/
-int add_changeset_to_tracker( ot_byte *data, size_t len ) {
+int add_changeset_to_tracker( uint8_t *data, size_t len ) {
ot_hash *hash;
- ot_byte *end = data + len;
+ uint8_t *end = data + len;
unsigned long peer_count;
/* We do know, that the string is \n terminated, so it cant
@@ -135,6 +139,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) );
if( mutex_workqueue_pushresult( taskid, iovec_entries, iovector ) )
iovec_free( &iovec_entries, &iovector );
}