summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ot_accesslist.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ot_accesslist.c b/ot_accesslist.c
index 11e4317..4eb63a7 100644
--- a/ot_accesslist.c
+++ b/ot_accesslist.c
@@ -47,12 +47,13 @@ static int accesslist_addentry( ot_hash infohash ) {
47} 47}
48 48
49/* Read initial access list */ 49/* Read initial access list */
50static void accesslist_readfile( int foo ) { 50static void accesslist_readfile( int sig ) {
51 FILE * accesslist_filehandle; 51 FILE * accesslist_filehandle;
52 ot_hash infohash; 52 ot_hash infohash;
53 char inbuf[512]; 53 char inbuf[512];
54 foo = foo;
55 54
55 if( sig != SIGHUP ) return;
56
56 accesslist_filehandle = fopen( g_accesslist_filename, "r" ); 57 accesslist_filehandle = fopen( g_accesslist_filename, "r" );
57 58
58 /* Free accesslist vector in trackerlogic.c*/ 59 /* Free accesslist vector in trackerlogic.c*/
@@ -98,7 +99,7 @@ void accesslist_init( ) {
98 99
99 /* Passing "0" since read_blacklist_file also is SIGHUP handler */ 100 /* Passing "0" since read_blacklist_file also is SIGHUP handler */
100 if( g_accesslist_filename ) { 101 if( g_accesslist_filename ) {
101 accesslist_readfile( 0 ); 102 accesslist_readfile( SIGHUP );
102 signal( SIGHUP, accesslist_readfile ); 103 signal( SIGHUP, accesslist_readfile );
103 } 104 }
104} 105}