Code

Updated FAI summary tab
[gosa.git] / gosa-si / gosa-si-server
index 168881af3464b7f0da3ee5c3f4f70a6744e5f59c..be587d2700a65f0d7216157a71defd54aa17daa4 100755 (executable)
@@ -320,9 +320,8 @@ usage: $prg [-hvf] [-c config] [-d number]
                           32 : ldap connectivity
                           64 : database status and connectivity
                          128 : main process 
 EOF
-    print "\n" ;
+       exit(0);
 }
 
 
@@ -431,11 +430,7 @@ sub check_cmdline_param () {
        }
 
        # Exit if an error occour
-    if( $err_counter > 0 ) 
-       {
-        &usage( "", 1 );
-        exit( -1 );
-    }
+    if( $err_counter > 0 ) { &usage( "", 1 ); }
 }
 
 
@@ -3420,7 +3415,7 @@ GetOptions("h|help" => \&usage,
         "v|verbose+" => \$verbose,
         "no-arp+" => \$no_arp,
                "d=s" => \$debug_parts,
-           ) or (&usage("", 1)&&(exit(-1))); 
+           ) or &usage("", 1); 
 
 #  read and set config parameters
 &check_cmdline_param ;
@@ -3629,9 +3624,14 @@ POE::Component::Server::TCP->new(
        ClientInput => sub {
                my ($kernel, $input, $heap, $session) = @_[KERNEL, ARG0, HEAP, SESSION];
         my $session_id = $session->ID;
-               if ($input =~ /;([\d\.]+:[\d]+)$/) 
+               if ($input =~ /;([\d\.]+):([\d]+)$/) 
                {
-                       &daemon_log("$session_id DEBUG: incoming message from '$1'", 11);
+                       # Messages from other servers should be blocked if config option is set
+                       if (($2 eq $server_port) && ($serverPackages_enabled eq "false"))
+                       {
+                               return;
+                       }
+                       &daemon_log("$session_id DEBUG: incoming message from '$1:$2'", 11);
                }
                else
                {