summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ot_fullscrape.c6
-rw-r--r--ot_fullscrape.h1
2 files changed, 6 insertions, 1 deletions
diff --git a/ot_fullscrape.c b/ot_fullscrape.c
index 6f898c4..bcf238c 100644
--- a/ot_fullscrape.c
+++ b/ot_fullscrape.c
@@ -52,11 +52,15 @@ static void * fullscrape_worker( void * args) {
52 return NULL; 52 return NULL;
53} 53}
54 54
55static pthread_t thread_id;
55void fullscrape_init( ) { 56void fullscrape_init( ) {
56 pthread_t thread_id;
57 pthread_create( &thread_id, NULL, fullscrape_worker, NULL ); 57 pthread_create( &thread_id, NULL, fullscrape_worker, NULL );
58} 58}
59 59
60void fullscrape_deinit( ) {
61 pthread_cancel( thread_id );
62}
63
60void fullscrape_deliver( int64 socket, ot_tasktype tasktype ) { 64void fullscrape_deliver( int64 socket, ot_tasktype tasktype ) {
61 mutex_workqueue_pushtask( socket, tasktype ); 65 mutex_workqueue_pushtask( socket, tasktype );
62} 66}
diff --git a/ot_fullscrape.h b/ot_fullscrape.h
index ef27c5c..22ef3cb 100644
--- a/ot_fullscrape.h
+++ b/ot_fullscrape.h
@@ -8,6 +8,7 @@
8#include "ot_mutex.h" 8#include "ot_mutex.h"
9 9
10void fullscrape_init( ); 10void fullscrape_init( );
11void fullscrape_deinit( );
11void fullscrape_deliver( int64 socket, ot_tasktype tasktype ); 12void fullscrape_deliver( int64 socket, ot_tasktype tasktype );
12 13
13#endif 14#endif