Core: should properly handle IPv4/IPv6 toggle preferences now
authorDan
Tue, 26 May 2009 15:25:58 -0400
changeset 70 efabb54a418d
parent 69 73780a159e15
child 71 8663af0e27c7
Core: should properly handle IPv4/IPv6 toggle preferences now
greyhound.php
--- a/greyhound.php	Tue May 26 15:25:30 2009 -0400
+++ b/greyhound.php	Tue May 26 15:25:58 2009 -0400
@@ -25,7 +25,7 @@
   // trap SIGTERM
   pcntl_signal(SIGTERM, 'sigterm');
   pcntl_signal(SIGINT,  'sigterm');
-  pcntl_signal(SIGUSR1, 'handle_refresh_signal');
+  pcntl_signal(SIGHUP, 'handle_refresh_signal');
 }
 
 @ini_set('display_errors', 'on');
@@ -112,25 +112,19 @@
 rebuild_playlist();
 
 // startup webserver
-$ip = array();
-if ( !$enable_ipv4 && !$enable_ipv6 )
-{
-  warning('Both IPv4 and IPv6 are disabled, enabling IPv4 access');
-  $enable_ipv4 = true;
-}
 if ( $public )
 {
   if ( $enable_ipv6 )
-    $ip[] = '::';
-  if ( $enable_ipv4 )
-    $ip[] = '0.0.0.0';
+    $ip = '::';
+  else
+    $ip = '0.0.0.0';
 }
 else
 {
   if ( $enable_ipv6 )
-    $ip[] = '::1';
-  if ( $enable_ipv4 )
-    $ip[] = '127.0.0.1';
+    $ip = '::1';
+  else
+    $ip = '127.0.0.1';
 }
 
 $port = 7447;