From f2c8a47a0259aa47d39501bc3b7994c6e4f83470 Mon Sep 17 00:00:00 2001 From: rettenbe Date: Fri, 14 Mar 2008 10:38:45 +0000 Subject: [PATCH] bugfix: correct update of FAIstate by CLMSG_TASKBEGIN finish and faiend git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9826 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/gosa-si-server | 1 - gosa-si/server/events/clMessages.pm | 6 ++++-- gosa-si/tests/client.php | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server index 08ce86f68..d403d3720 100755 --- a/gosa-si/gosa-si-server +++ b/gosa-si/gosa-si-server @@ -1343,7 +1343,6 @@ sub change_fai_state { filter => "$search" ); -#print STDERR "=============================================\n$search\n"; if ($mesg->count) { my @entries = $mesg->entries; foreach my $entry (@entries) { diff --git a/gosa-si/server/events/clMessages.pm b/gosa-si/server/events/clMessages.pm index 9998ed1af..3415ea14c 100644 --- a/gosa-si/server/events/clMessages.pm +++ b/gosa-si/server/events/clMessages.pm @@ -165,14 +165,16 @@ sub CURRENTLY_LOGGED_IN { my $source = @{$msg_hash->{'source'}}[0]; my $login = @{$msg_hash->{$header}}[0]; + # fetch all user currently assigned to the client at login_users_db + my %currently_logged_in_user = (); $sql_statement = "SELECT * FROM $main::login_users_tn WHERE client='$source'"; $db_res = $main::login_users_db->select_dbentry($sql_statement); - my %currently_logged_in_user = (); while( my($hit_id, $hit) = each(%{$db_res}) ) { $currently_logged_in_user{$hit->{'user'}} = 1; } &main::daemon_log("$session_id DEBUG: logged in users from login_user_db: ".join(", ", keys(%currently_logged_in_user)), 7); + # my @logged_in_user = split(/\s+/, $login); &main::daemon_log("$session_id DEBUG: logged in users reported from client: ".join(", ", @logged_in_user), 7); foreach my $user (@logged_in_user) { @@ -330,7 +332,7 @@ sub TASKBEGIN { &main::daemon_log("$session_id INFO: $header at '$macaddress' - '$content'", 5); # set fai_state to localboot - &main::change_fai_state('localboot', \@{$msg_hash->{target}}, $session_id); + &main::change_fai_state('localboot', \@{$msg_hash->{'macaddress'}}, $session_id); } else { my $sql_statement = "UPDATE $main::job_queue_tn ". diff --git a/gosa-si/tests/client.php b/gosa-si/tests/client.php index 36bf5390b..6bf855f16 100755 --- a/gosa-si/tests/client.php +++ b/gosa-si/tests/client.php @@ -18,7 +18,7 @@ if($sock->connected()){ # jobdb add #$data = "
gosa_network_completition
GOSAGOSAws-muc-2
"; #$data = "
job_sayHello
10.89.1.155:2008300:1B:77:04:8A:6C 20130102133900
"; -$data = "
job_ping
GOSA 00:01:6c:9d:b9:fa 00:01:6c:9d:b9:fa19700101000000
"; +#$data = "
job_ping
GOSA 00:01:6c:9d:b9:fa 00:01:6c:9d:b9:fa19700101000000
"; # jobdb delete @@ -58,7 +58,7 @@ $data = "
job_ping
GOSA 00:01:6c: #$data = "
gosa_new_key_for_client
00:01:6c:9d:b9:fa 10.89.1.31:20081
"; #$data = "
job_trigger_action_wake
00:01:6c:9d:b9:fa GOSA 19700101000000
"; #$data = "
gosa_trigger_action_faireboot
00:01:6c:9d:b9:fa GOSA
"; -#$data = "
job_trigger_action_reinstall
GOSA 00:01:6c:9d:b9:fa 00:01:6c:9d:b9:fa 19700101000000
"; +$data = "
job_trigger_action_reinstall
GOSA 00:01:6c:9d:b9:fa 00:01:6c:9d:b9:fa 19700101000000
"; #$data = "
job_trigger_action_instant_update
00:01:6c:9d:b9:fa GOSA 19700101000000
"; #$data = "
gosa_ping
00:01:6c:9d:b9:fa GOSA
"; -- 2.30.2