summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2064f0c)
raw | patch | inline | side by side (parent: 2064f0c)
author | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 25 Feb 2008 17:18:39 +0000 (17:18 +0000) | ||
committer | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 25 Feb 2008 17:18:39 +0000 (17:18 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9113 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/modules/GosaPackages.pm | patch | blob | history | |
gosa-si/modules/GosaSupportDaemon.pm | patch | blob | history |
index b71485cfcfb806a09dfbf2424b13c10f8882e72d..5c9bb9a472130f1352390931c23114317f147577 100644 (file)
my @msg_l;
my @out_msg_l;
- &main::daemon_log("GosaPackages: receive '$header'", 1);
+ &main::daemon_log("DEBUG: GosaPackages: receive '$header'", 8);
if ($header =~ /^job_/) {
@msg_l = &process_job_msg($msg, $msg_hash, $session_id);
@msg_l = &process_gosa_msg($msg, $msg_hash, $session_id);
}
else {
- &main::daemon_log("ERROR: $header is not a valid GosaPackage-header, need a 'job_' or a 'gosa_' prefix");
+ &main::daemon_log("ERROR: $header is not a valid GosaPackage-header, need a 'job_' or a 'gosa_' prefix", 1);
}
foreach my $out_msg ( @msg_l ) {
sub query_jobdb {
my ($msg) = @_;
my $msg_hash = &transform_msg2hash($msg);
+ my $target = @{$msg_hash->{'target'}}[0];
+ my $source = @{$msg_hash->{'source'}}[0];
# prepare query sql statement
my $select= &get_select_statement($msg, $msg_hash);
- my $table= $main::job_queue_table_name;
+ my $table= $main::job_queue_tn;
my $where= &get_where_statement($msg, $msg_hash);
my $limit= &get_limit_statement($msg, $msg_hash);
my $orderby= &get_orderby_statement($msg, $msg_hash);
# execute db query
my $res_hash = $main::job_db->select_dbentry($sql_statement);
- my $out_xml = &db_res2xml($res_hash);
+ my $out_xml = &db_res2si_msg($res_hash, "query_jobdb", $target, $source);
my @out_msg_l = ( $out_xml );
return @out_msg_l;
}
index 6fecf1bb302f341162014517fc895737c755dab8..2044f54c1f34f1f2a17790740165c67ae9ce8ea0 100644 (file)
"get_time",
"build_msg",
"db_res2xml",
+ "db_res2si_msg",
"get_where_statement",
"get_select_statement",
"get_update_statement",
}
+sub db_res2si_msg {
+ my ($db_res, $header, $target, $source) = @_;
+
+ my $si_msg = "<xml>";
+ $si_msg .= "<header>$header</header>";
+ $si_msg .= "<source>$source</source>";
+ $si_msg .= "<target>$target</target>";
+ $si_msg .= &db_res2xml;
+ $si_msg .= "</xml>";
+}
+
+
sub get_where_statement {
my ($msg, $msg_hash) = @_;
my $error= 0;