Browse Source

Make accesslist function check for the correct signal

dynamic-accesslists
erdgeist 16 years ago
parent
commit
dfa173b071
  1. 7
      ot_accesslist.c

7
ot_accesslist.c

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

Loading…
Cancel
Save