index e5adf16daecc0eb9276d3daa29abe6d15667a8b3..4f01dc8d19a451464581f1b15913ad8a8db3ba7d 100644 (file)
"count_packages_list",
"query_fai_server",
"count_fai_server",
- "query_fai_releases",
- "count_fai_releases",
+ "query_fai_release",
+ "count_fai_release",
);
@EXPORT = @events;
use warnings;
use GOSA::GosaSupportDaemon;
use Data::Dumper;
-use utf8;
BEGIN {}
return \@events;
}
-sub query_fai_releases{ return &query_db( @_ ); }
+sub query_fai_release{ return &query_db( @_ ); }
sub query_fai_server{ return &query_db( @_ ) ; }
sub query_packages_list { return &query_db( @_ ) ; }
sub query_jobdb { return &query_db( @_ ) ; }
$db = $main::packages_list_db;
} elsif( $header =~ /query_fai_server/ ) {
$table = $main::fai_server_tn;
- $db = $main::fai_server_db
- } elsif( $header =~ /count_fai_releases/ ) {
- $table = $main::fai_releases_tn;
- $db = $main::fai_server_db
+ $db = $main::fai_server_db;
+ } elsif( $header =~ /query_fai_release/ ) {
+ $table = $main::fai_release_tn;
+ $db = $main::fai_release_db;
}
my $res_hash = $db->select_dbentry($sql_statement);
my $out_xml = &db_res2si_msg($res_hash, $header, $target, $source);
+ $out_xml =~ s/<\/xml>/<session_id>$session_id<\/session_id><\/xml>/;
my @out_msg_l = ( $out_xml );
return @out_msg_l;
}
-sub count_fai_releases{ return &count_db( @_ ); }
+sub count_fai_releas{ return &count_db( @_ ); }
sub count_fai_server{ return &count_db( @_ ); }
sub count_packages_list{ return &count_db( @_ ); }
sub count_jobdb{ return &count_db( @_ ); }
$db = $main::packages_list_db;
} elsif( $header =~ /count_fai_server/ ) {
$table = $main::fai_server_tn;
- $db = $main::fai_server_db
- } elsif( $header =~ /count_fai_releases/ ) {
- $table = $main::fai_releases_tn;
- $db = $main::fai_server_db
+ $db = $main::fai_server_db;
+ } elsif( $header =~ /count_fai_release/ ) {
+ $table = $main::fai_release_tn;
+ $db = $main::fai_server_db;
}
}
# prepare xml answer
- my $out_xml = "<xml><header>answer</header><source>$target</source><target>$source</target><answer1>$res</answer1></xml>";
+ my $out_xml = "<xml><header>answer</header><source>$target</source><target>$source</target><answer1>$res</answer1><session_id>$session_id</session_id></xml>";
my @out_msg_l = ( $out_xml );
return @out_msg_l;
if( not $db_res > 0 ) { $error++; };
if( $error == 0 ) {
- $out_xml = "<xml><header>answer</header><source>$target</source><target>$source</target><answer1>0</answer1></xml>";
+ $out_xml = "<xml><header>answer</header><source>$target</source><target>$source</target><answer1>0</answer1><session_id>$session_id</session_id></xml>";
}
my @out_msg_l = ( $out_xml );
return @out_msg_l;
my $source = @{$msg_hash->{'source'}}[0];
my $error= 0;
- my $out_xml= "<xml><header>answer</header><source>$target</source><target>$source</target><answer1>1</answer1></xml>";
+ my $out_xml= "<xml><header>answer</header><source>$target</source><target>$source</target><answer1>1</answer1><session_id>$session_id</session_id></xml>";
my @len_hash = keys %{$msg_hash};
if( 0 == @len_hash) { $error++; };
$out_xml = "<answer1>0</answer1>";
}
- my $out_msg = sprintf("<xml><header>answer</header><source>%s</source><target>%s</target>%s</xml>", $target, $source, $out_xml);
+ my $out_msg = sprintf("<xml><header>answer</header><source>%s</source><target>%s</target>%s<session_id>$session_id</session_id></xml>", $target, $source, $out_xml);
my @out_msg_l = ( $out_msg );
return @out_msg_l;
}