|
|
@ -47,12 +47,13 @@ static int accesslist_addentry( ot_hash infohash ) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* Read initial access list */ |
|
|
|
/* Read initial access list */ |
|
|
|
static void accesslist_readfile( int foo ) { |
|
|
|
static void accesslist_readfile( int sig ) { |
|
|
|
FILE * accesslist_filehandle; |
|
|
|
FILE * accesslist_filehandle; |
|
|
|
ot_hash infohash; |
|
|
|
ot_hash infohash; |
|
|
|
char inbuf[512]; |
|
|
|
char inbuf[512]; |
|
|
|
foo = foo; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( sig != SIGHUP ) return; |
|
|
|
|
|
|
|
|
|
|
|
accesslist_filehandle = fopen( g_accesslist_filename, "r" ); |
|
|
|
accesslist_filehandle = fopen( g_accesslist_filename, "r" ); |
|
|
|
|
|
|
|
|
|
|
|
/* Free accesslist vector in trackerlogic.c*/ |
|
|
|
/* Free accesslist vector in trackerlogic.c*/ |
|
|
@ -98,7 +99,7 @@ void accesslist_init( ) { |
|
|
|
|
|
|
|
|
|
|
|
/* Passing "0" since read_blacklist_file also is SIGHUP handler */ |
|
|
|
/* Passing "0" since read_blacklist_file also is SIGHUP handler */ |
|
|
|
if( g_accesslist_filename ) { |
|
|
|
if( g_accesslist_filename ) { |
|
|
|
accesslist_readfile( 0 ); |
|
|
|
accesslist_readfile( SIGHUP ); |
|
|
|
signal( SIGHUP, accesslist_readfile ); |
|
|
|
signal( SIGHUP, accesslist_readfile ); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|