diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server
index a34e5c97cb43c061b496353f7d20dae4579acae6..515fe6ef25f90d093f34331d1b4c4dacac2d130c 100755 (executable)
--- a/gosa-si/gosa-si-server
+++ b/gosa-si/gosa-si-server
if (not $file =~ /(\S*?).pm$/) {
next;
}
+
+ if( $no_arp > 0 ) {
+ if( $file =~ /ArpHandler.pm/ ) {
+ next;
+ }
+ }
eval { require $file; };
if ($@) {
daemon_log("ERROR: gosa-si-server could not load module $file", 1);
daemon_log("$@", 5);
- } else {
- my $mod_name = $1;
- my $info = eval($mod_name.'::get_module_info()');
- my ($input_address, $input_key, $input, $input_active, $input_type) = @{$info};
- $known_modules->{$mod_name} = $info;
-
- daemon_log("module $mod_name loaded", 1);
- }
+ } else {
+ my $mod_name = $1;
+ my $info = eval($mod_name.'::get_module_info()');
+
+ # Only load module if get_module_info() returns a non-null object
+ if(defined($info)) {
+ my ($input_address, $input_key, $input, $input_active, $input_type) = @{$info};
+ $known_modules->{$mod_name} = $info;
+ daemon_log("module $mod_name loaded", 1);
+ }
+ }
}
# for debugging
sub client_input {
my ($heap,$input,$wheel) = @_[HEAP, ARG0, ARG1];
+
+ daemon_log("Incoming msg:\n$input\n", 8);
+
######################################
# forward msg to all imported modules
no strict "refs";
# check wether all modules are gosa-si valid passwd check
# create session for repeatedly checking the job queue for jobs
-POE::Session->create
-(
+POE::Session->create(
inline_states => {
_start => \&trigger_db_loop,
watch_for_new_jobs => \&watch_for_new_jobs,
);
# create socket for incoming xml messages
-POE::Component::Server::TCP->new
-(
+POE::Component::Server::TCP->new(
Port => $server_port,
ClientInput => \&client_input,
);