summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--opentracker.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/opentracker.c b/opentracker.c
index ff1c1c6..d97e73e 100644
--- a/opentracker.c
+++ b/opentracker.c
@@ -759,15 +759,19 @@ static void ot_try_bind( char ip[4], uint16 port, int is_tcp ) {
759#ifdef WANT_BLACKLISTING 759#ifdef WANT_BLACKLISTING
760/* Read initial black list */ 760/* Read initial black list */
761void read_blacklist_file( int foo ) { 761void read_blacklist_file( int foo ) {
762 FILE * blacklist_filehandle = fopen( blacklist_filename, "r" ); 762 FILE * blacklist_filehandle;
763 ot_hash infohash; 763 ot_hash infohash;
764 foo = foo; 764 foo = foo;
765 765
766 signal( SIGHUP, SIG_IGN );
767 blacklist_filehandle = fopen( blacklist_filename, "r" );
768
766 /* Free blacklist vector in trackerlogic.c*/ 769 /* Free blacklist vector in trackerlogic.c*/
767 blacklist_reset(); 770 blacklist_reset();
768 771
769 if( blacklist_filehandle == NULL ) { 772 if( blacklist_filehandle == NULL ) {
770 fprintf( stderr, "Warning: Can't open blacklist file: %s (but will try to create it later, if necessary and possible).", blacklist_filename ); 773 fprintf( stderr, "Warning: Can't open blacklist file: %s (but will try to create it later, if necessary and possible).", blacklist_filename );
774 signal( SIGHUP, read_blacklist_file );
771 return; 775 return;
772 } 776 }
773 777
@@ -789,7 +793,9 @@ void read_blacklist_file( int foo ) {
789ignore_line: 793ignore_line:
790 continue; 794 continue;
791 } 795 }
796
792 fclose( blacklist_filehandle ); 797 fclose( blacklist_filehandle );
798 signal( SIGHUP, read_blacklist_file );
793} 799}
794#endif 800#endif
795 801