diff options
| author | erdgeist <> | 2009-07-01 02:48:56 +0000 |
|---|---|---|
| committer | erdgeist <> | 2009-07-01 02:48:56 +0000 |
| commit | dfa173b071a19c59201486398afc00b45dbe9cc1 (patch) | |
| tree | b12235ed73c7ba023a7a87ccdaa85edfdab1c67a | |
| parent | 7d67d38e274ed465604117442bc4b20323c744e9 (diff) | |
Make accesslist function check for the correct signal
| -rw-r--r-- | ot_accesslist.c | 7 |
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 */ |
| 50 | static void accesslist_readfile( int foo ) { | 50 | static 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 | } |
