index d40ca0b8f7ad39fc0740e8540a732d32cba6f37e..9e057c8f1f80ab0215da1f294c6a7c2cfc5906be 100644 (file)
use warnings;
use GOSA::GosaSupportDaemon;
use Data::Dumper;
use warnings;
use GOSA::GosaSupportDaemon;
use Data::Dumper;
-use utf8;
BEGIN {}
BEGIN {}
return \@events;
}
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( @_ ) ; }
sub query_fai_server{ return &query_db( @_ ) ; }
sub query_packages_list { return &query_db( @_ ) ; }
sub query_jobdb { return &query_db( @_ ) ; }
} elsif( $header =~ /query_fai_server/ ) {
$table = $main::fai_server_tn;
$db = $main::fai_server_db;
} elsif( $header =~ /query_fai_server/ ) {
$table = $main::fai_server_tn;
$db = $main::fai_server_db;
- } elsif( $header =~ /count_fai_release/ ) {
+ } elsif( $header =~ /query_fai_release/ ) {
$table = $main::fai_release_tn;
$table = $main::fai_release_tn;
- $db = $main::fai_server_db;
+ $db = $main::fai_release_db;
}
}
my $res_hash = $db->select_dbentry($sql_statement);
my $out_xml = &db_res2si_msg($res_hash, $header, $target, $source);
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;
}
my @out_msg_l = ( $out_xml );
return @out_msg_l;
}
-sub count_fai_release{ 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( @_ ); }
sub count_fai_server{ return &count_db( @_ ); }
sub count_packages_list{ return &count_db( @_ ); }
sub count_jobdb{ return &count_db( @_ ); }
my $table= $main::job_queue_tn;
my $where= &get_where_statement($msg, $msg_hash);
my $sql_statement = "DELETE FROM $table $where";
my $table= $main::job_queue_tn;
my $where= &get_where_statement($msg, $msg_hash);
my $sql_statement = "DELETE FROM $table $where";
-
+ &main::daemon_log("$session_id DEBUG: $sql_statement",7);
# execute db query
my $db_res = $main::job_db->del_dbentry($sql_statement);
# execute db query
my $db_res = $main::job_db->del_dbentry($sql_statement);
}
# prepare xml answer
}
# 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;
my @out_msg_l = ( $out_xml );
return @out_msg_l;
if( not $db_res > 0 ) { $error++; };
if( $error == 0 ) {
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 @out_msg_l = ( $out_xml );
return @out_msg_l;
my $source = @{$msg_hash->{'source'}}[0];
my $error= 0;
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++; };
my @len_hash = keys %{$msg_hash};
if( 0 == @len_hash) { $error++; };
$out_xml = "<answer1>0</answer1>";
}
$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;
}
my @out_msg_l = ( $out_msg );
return @out_msg_l;
}