summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerdgeist <>2007-12-03 00:52:05 +0000
committererdgeist <>2007-12-03 00:52:05 +0000
commitb0e4ebbbf2a3235077c6d607ef881b6791597087 (patch)
tree45812c7cfecef0979633e90fd4e8cf40518bcc8e
parent89f291566b850e86c379f485eec4a2dfea87c391 (diff)
Simplify includes
-rw-r--r--ot_clean.c2
-rw-r--r--ot_clean.h2
-rw-r--r--ot_iovec.h2
-rw-r--r--ot_mutex.c2
-rw-r--r--ot_sync.c9
-rw-r--r--ot_vector.h2
6 files changed, 11 insertions, 8 deletions
diff --git a/ot_clean.c b/ot_clean.c
index e8d2841..308c848 100644
--- a/ot_clean.c
+++ b/ot_clean.c
@@ -5,9 +5,11 @@
5#include <stdlib.h> 5#include <stdlib.h>
6#include <string.h> 6#include <string.h>
7#include <pthread.h> 7#include <pthread.h>
8#include <sys/uio.h>
8 9
9/* Libowfat */ 10/* Libowfat */
10#include "byte.h" 11#include "byte.h"
12#include "io.h"
11 13
12/* Opentracker */ 14/* Opentracker */
13#include "trackerlogic.h" 15#include "trackerlogic.h"
diff --git a/ot_clean.h b/ot_clean.h
index 73dcd10..8ad1ae8 100644
--- a/ot_clean.h
+++ b/ot_clean.h
@@ -4,8 +4,6 @@
4#ifndef __OT_CLEAN_H__ 4#ifndef __OT_CLEAN_H__
5#define __OT_CLEAN_H__ 5#define __OT_CLEAN_H__
6 6
7#include "trackerlogic.h"
8
9void clean_init( void ); 7void clean_init( void );
10void clean_deinit( void ); 8void clean_deinit( void );
11 9
diff --git a/ot_iovec.h b/ot_iovec.h
index d52a167..d7105bd 100644
--- a/ot_iovec.h
+++ b/ot_iovec.h
@@ -4,8 +4,6 @@
4#ifndef __OT_IOVEC_H__ 4#ifndef __OT_IOVEC_H__
5#define __OT_IOVEC_H__ 5#define __OT_IOVEC_H__
6 6
7#include <sys/uio.h>
8
9void *iovec_increase( int *iovec_entries, struct iovec **iovector, size_t new_alloc ); 7void *iovec_increase( int *iovec_entries, struct iovec **iovector, size_t new_alloc );
10void iovec_fixlast( int *iovec_entries, struct iovec **iovector, void *last_ptr ); 8void iovec_fixlast( int *iovec_entries, struct iovec **iovector, void *last_ptr );
11void iovec_free( int *iovec_entries, struct iovec **iovector ); 9void iovec_free( int *iovec_entries, struct iovec **iovector );
diff --git a/ot_mutex.c b/ot_mutex.c
index fb632d7..6bcaf12 100644
--- a/ot_mutex.c
+++ b/ot_mutex.c
@@ -6,9 +6,11 @@
6#include <stdio.h> 6#include <stdio.h>
7#include <stdlib.h> 7#include <stdlib.h>
8#include <sys/mman.h> 8#include <sys/mman.h>
9#include <sys/uio.h>
9 10
10/* Libowfat */ 11/* Libowfat */
11#include "byte.h" 12#include "byte.h"
13#include "io.h"
12 14
13/* Opentracker */ 15/* Opentracker */
14#include "trackerlogic.h" 16#include "trackerlogic.h"
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 @@
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*/
28int add_changeset_to_tracker( ot_byte *data, size_t len ) { 32int 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 }
diff --git a/ot_vector.h b/ot_vector.h
index 0f68488..ed235a3 100644
--- a/ot_vector.h
+++ b/ot_vector.h
@@ -4,8 +4,6 @@
4#ifndef __OT_VECTOR_H__ 4#ifndef __OT_VECTOR_H__
5#define __OT_VECTOR_H__ 5#define __OT_VECTOR_H__
6 6
7#include "trackerlogic.h"
8
9/* These defines control vectors behaviour */ 7/* These defines control vectors behaviour */
10#define OT_VECTOR_MIN_MEMBERS 4 8#define OT_VECTOR_MIN_MEMBERS 4
11#define OT_VECTOR_GROW_RATIO 8 9#define OT_VECTOR_GROW_RATIO 8