summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1e90278)
raw | patch | inline | side by side (parent: 1e90278)
author | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 2 Sep 2008 09:15:30 +0000 (09:15 +0000) | ||
committer | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 2 Sep 2008 09:15:30 +0000 (09:15 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12340 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/modules/ServerPackages.pm | patch | blob | history |
index 7a1357dc77e6725210de444cfd9a8c9ed285a722..9d659184043bc0eb6c1d8389be84ee366848b073 100644 (file)
}
}
+# build vice versa event_hash, event_name => module
+my $event2module_hash = {};
+while (my ($module, $mod_events) = each %$event_hash) {
+ while (my ($event_name, $nothing) = each %$mod_events) {
+ $event2module_hash->{$event_name} = $module;
+ }
+
+}
+
### FUNCTIONS #####################################################################
sub get_module_info {
&main::daemon_log("$session_id DEBUG: ServerPackages: msg to process '$header'", 7);
- if( exists $event_hash->{$header} ) {
+ 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 '".$event_hash->{$header}."'", 5);
+ &main::daemon_log("$session_id INFO: found event '$header' at event-module '".$event2module_hash->{$header}."'", 5);
no strict 'refs';
- @out_msg_l = &{$event_hash->{$header}."::$header"}($msg, $msg_hash, $session_id);
+ @out_msg_l = &{$event2module_hash->{$header}."::$header"}($msg, $msg_hash, $session_id);
} else {
$sql_events = "SELECT * FROM $main::known_clients_tn WHERE ( (macaddress LIKE '$target') OR (hostname='$target') )";
return \@out_msg_l;
}
+
1;