X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=gosa-si%2Fmodules%2FServerPackages.pm;h=bf4ac091b12ef38025b4a79eb89017d5567254b1;hb=1d7e912782ed15ea9f06bc109af3641492c0964c;hp=9d659184043bc0eb6c1d8389be84ee366848b073;hpb=e10d90638cd487187d4b46d12fb879cd4ebfe2a4;p=gosa.git diff --git a/gosa-si/modules/ServerPackages.pm b/gosa-si/modules/ServerPackages.pm index 9d6591840..bf4ac091b 100644 --- a/gosa-si/modules/ServerPackages.pm +++ b/gosa-si/modules/ServerPackages.pm @@ -1,14 +1,18 @@ package ServerPackages; -use Exporter; -@ISA = ("Exporter"); + # Each module has to have a function 'process_incoming_msg'. This function works as a interface to gosa-sd and receives the msg hash from gosa-sd. 'process_incoming_function checks, wether it has a function to process the incoming msg and forward the msg to it. use strict; use warnings; -use GOSA::GosaSupportDaemon; + use Data::Dumper; +use GOsaSI::GosaSupportDaemon; + +use Exporter; + +our @ISA = ("Exporter"); my $event_dir = "/usr/lib/gosa-si/server/ServerPackages"; use lib "/usr/lib/gosa-si/server/ServerPackages"; @@ -23,7 +27,7 @@ END {} my ($error, $result, $event_hash) = &import_events($event_dir); foreach my $log_line (@$result) { if ($log_line =~ / succeed: /) { - &main::daemon_log("0 DEBUG: ServerPackages - $log_line", 7); + &main::daemon_log("0 INFO: ServerPackages - $log_line", 5); } else { &main::daemon_log("0 ERROR: ServerPackages - $log_line", 1); } @@ -64,10 +68,10 @@ sub process_incoming_msg { $msg =~ s/
gosa_(\w+)<\/header>|
job_(\w+)<\/header>/
$1<\/header>/; - &main::daemon_log("$session_id DEBUG: ServerPackages: msg to process '$header'", 7); + &main::daemon_log("$session_id DEBUG: ServerPackages: msg to process '$header'", 26); if( exists $event2module_hash->{$header} ) { # a event exists with the header as name - &main::daemon_log("$session_id INFO: found event '$header' at event-module '".$event2module_hash->{$header}."'", 5); + &main::daemon_log("$session_id INFO: found event '$header' at event-module '".$event2module_hash->{$header}."'", 26); no strict 'refs'; @out_msg_l = &{$event2module_hash->{$header}."::$header"}($msg, $msg_hash, $session_id);