diff options
| author | erdgeist <> | 2007-12-03 00:52:05 +0000 |
|---|---|---|
| committer | erdgeist <> | 2007-12-03 00:52:05 +0000 |
| commit | b0e4ebbbf2a3235077c6d607ef881b6791597087 (patch) | |
| tree | 45812c7cfecef0979633e90fd4e8cf40518bcc8e /ot_sync.c | |
| parent | 89f291566b850e86c379f485eec4a2dfea87c391 (diff) | |
Simplify includes
Diffstat (limited to 'ot_sync.c')
| -rw-r--r-- | ot_sync.c | 9 |
1 files changed, 7 insertions, 2 deletions
| @@ -4,6 +4,7 @@ | |||
| 4 | /* System */ | 4 | /* System */ |
| 5 | #include <sys/types.h> | 5 | #include <sys/types.h> |
| 6 | #include <sys/mman.h> | 6 | #include <sys/mman.h> |
| 7 | #include <sys/uio.h> | ||
| 7 | #include <stdio.h> | 8 | #include <stdio.h> |
| 8 | #include <string.h> | 9 | #include <string.h> |
| 9 | #include <pthread.h> | 10 | #include <pthread.h> |
| @@ -11,11 +12,14 @@ | |||
| 11 | /* Libowfat */ | 12 | /* Libowfat */ |
| 12 | #include "scan.h" | 13 | #include "scan.h" |
| 13 | #include "byte.h" | 14 | #include "byte.h" |
| 15 | #include "io.h" | ||
| 14 | 16 | ||
| 15 | /* Opentracker */ | 17 | /* Opentracker */ |
| 16 | #include "trackerlogic.h" | 18 | #include "trackerlogic.h" |
| 17 | #include "ot_mutex.h" | 19 | #include "ot_mutex.h" |
| 18 | #include "ot_sync.h" | 20 | #include "ot_sync.h" |
| 21 | #include "ot_stats.h" | ||
| 22 | #include "ot_iovec.h" | ||
| 19 | 23 | ||
| 20 | #ifdef WANT_TRACKER_SYNC | 24 | #ifdef WANT_TRACKER_SYNC |
| 21 | 25 | ||
| @@ -25,9 +29,9 @@ | |||
| 25 | format: d4:syncd[..]ee | 29 | format: d4:syncd[..]ee |
| 26 | [..]: ( 20:01234567890abcdefghij16:XXXXYYYY )+ | 30 | [..]: ( 20:01234567890abcdefghij16:XXXXYYYY )+ |
| 27 | */ | 31 | */ |
| 28 | int add_changeset_to_tracker( ot_byte *data, size_t len ) { | 32 | int add_changeset_to_tracker( uint8_t *data, size_t len ) { |
| 29 | ot_hash *hash; | 33 | ot_hash *hash; |
| 30 | ot_byte *end = data + len; | 34 | uint8_t *end = data + len; |
| 31 | unsigned long peer_count; | 35 | unsigned long peer_count; |
| 32 | 36 | ||
| 33 | /* We do know, that the string is \n terminated, so it cant | 37 | /* We do know, that the string is \n terminated, so it cant |
| @@ -135,6 +139,7 @@ static void * sync_worker( void * args) { | |||
| 135 | ot_tasktype tasktype = TASK_SYNC_OUT; | 139 | ot_tasktype tasktype = TASK_SYNC_OUT; |
| 136 | ot_taskid taskid = mutex_workqueue_poptask( &tasktype ); | 140 | ot_taskid taskid = mutex_workqueue_poptask( &tasktype ); |
| 137 | sync_make( &iovec_entries, &iovector ); | 141 | sync_make( &iovec_entries, &iovector ); |
| 142 | stats_issue_event( EVENT_SYNC_OUT, 1, iovec_length( &iovec_entries, &iovector) ); | ||
| 138 | if( mutex_workqueue_pushresult( taskid, iovec_entries, iovector ) ) | 143 | if( mutex_workqueue_pushresult( taskid, iovec_entries, iovector ) ) |
| 139 | iovec_free( &iovec_entries, &iovector ); | 144 | iovec_free( &iovec_entries, &iovector ); |
| 140 | } | 145 | } |
