From 07e7aff451291bc6fbc98cced2b2325a8c5b8511 Mon Sep 17 00:00:00 2001 From: rettenbe Date: Fri, 14 Mar 2008 15:56:23 +0000 Subject: [PATCH 1/1] change: TASKERROR set FAIstate to error git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9875 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/server/events/clMessages.pm | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/gosa-si/server/events/clMessages.pm b/gosa-si/server/events/clMessages.pm index 69e8e0d7e..e14b2da46 100644 --- a/gosa-si/server/events/clMessages.pm +++ b/gosa-si/server/events/clMessages.pm @@ -222,7 +222,11 @@ sub GOTOACTIVATION { my $macaddress = @{$msg_hash->{'macaddress'}}[0]; # test whether content is an empty hash or a string which is required - my $content = @{$msg_hash->{$header}}[0]; +# TODO eval ändern auf if(ref($content) eq "HASH") dann ... else, dann... +# my $content = @{$msg_hash->{$header}}[0]; +# $content = "$content"; +# if(ref($content) eq "HASH") { $content = ""; } +# eval{ if( 0 == keys(%$content) ) { $content = ""; } }; if( $@ ) { $content = "$content"; } @@ -248,6 +252,7 @@ sub PROGRESS { # test whether content is an empty hash or a string which is required my $content; my $cont = @{$msg_hash->{$header}}[0]; +# TODO eval ändern auf if(ref($content) eq "HASH") dann ... else, dann... eval{ if( 0 == keys(%$cont) ) { $content = ""; } }; if( $@ ) { $content = "$cont"; } @@ -273,6 +278,7 @@ sub FAIREBOOT { # test whether content is an empty hash or a string which is required my $content = @{$msg_hash->{$header}}[0]; +# TODO eval ändern auf if(ref($content) eq "HASH") dann ... else, dann... eval{ if( 0 == keys(%$content) ) { $content = ""; } }; if( $@ ) { $content = "$content"; } @@ -298,6 +304,7 @@ sub TASKSKIP { # test whether content is an empty hash or a string which is required my $content = @{$msg_hash->{$header}}[0]; +# TODO eval ändern auf if(ref($content) eq "HASH") dann ... else, dann... eval{ if( 0 == keys(%$content) ) { $content = ""; } }; if( $@ ) { $content = "$content"; } @@ -323,6 +330,7 @@ sub TASKBEGIN { my $content = @{$msg_hash->{$header}}[0]; # test whether content is an empty hash or a string which is required +# TODO eval ändern auf if(ref($content) eq "HASH") dann ... else, dann... eval{ if( 0 == keys(%$content) ) { $content = ""; } }; if( $@ ) { $content = "$content"; } @@ -369,6 +377,7 @@ sub TASKEND { # test whether content is an empty hash or a string which is required my $content = @{$msg_hash->{$header}}[0]; +# TODO eval ändern auf if(ref($content) eq "HASH") dann ... else, dann... eval{ if( 0 == keys(%$content) ) { $content = ""; } }; if( $@ ) { $content = "$content"; } @@ -403,9 +412,13 @@ sub TASKERROR { # test whether content is an empty hash or a string which is required my $content = @{$msg_hash->{$header}}[0]; +# TODO eval ändern auf if(ref($content) eq "HASH") dann ... else, dann... eval{ if( 0 == keys(%$content) ) { $content = ""; } }; if( $@ ) { $content = "$content"; } + # set fai_state to localboot + &main::change_fai_state('error', \@{$msg_hash->{'macaddress'}}, $session_id); + my $sql_statement = "UPDATE $main::job_queue_tn ". "SET status='processing', result='$header "."$content' ". "WHERE status='processing' AND macaddress LIKE '$macaddress'"; @@ -434,6 +447,8 @@ sub HOOK { # test whether content is an empty hash or a string which is required my $content = @{$msg_hash->{$header}}[0]; + +# TODO eval ändern auf if(ref($content) eq "HASH") dann ... else, dann... eval{ if( 0 == keys(%$content) ) { $content = ""; } }; if( $@ ) { $content = "$content"; } -- 2.30.2