summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6aa244e)
raw | patch | inline | side by side (parent: 6aa244e)
author | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 7 Apr 2008 12:50:36 +0000 (12:50 +0000) | ||
committer | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 7 Apr 2008 12:50:36 +0000 (12:50 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10239 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/gosa-si-client | patch | blob | history | |
gosa-si/server/events/clMessages.pm | patch | blob | history |
diff --git a/gosa-si/gosa-si-client b/gosa-si/gosa-si-client
index 4ce9ceb4c57e283a177826393da0ead47a46cdf4..a56292bcd33dc6190ffb8467e597efce66bddd48 100755 (executable)
--- a/gosa-si/gosa-si-client
+++ b/gosa-si/gosa-si-client
@logged_in_user_list = split(/\s/, $result);
}
-# my @res_lines;
-#
-# if( defined $result ) {
-# chomp($result);
-# @res_lines = split("\n", $result);
-# }
-#
-# my @logged_in_user_list;
-# foreach my $line (@res_lines) {
-# chomp($line);
-# my @line_parts = split(/\s+/, $line);
-# push(@logged_in_user_list, $line_parts[0]);
-# }
-#
system("echo 'CURRENTLY_LOGGED_IN ".join(" ", @logged_in_user_list)."' > /var/run/gosa-si-client.socket");
$kernel->delay_set('trigger_logged_in_users_report', $trigger_logged_in_users_report_delay);
} else {
- # try it in 1 sec again
+ # try it in 10 sec again
$kernel->delay_set('trigger_logged_in_users_report', 10);
}
}
index d0ac380720afe31464189eaf6d5f843522664bda..6cdfd7f7d2c98bce5a80c71f21e70bb1e2a28c5f 100644 (file)
return;
}
-# TODO umstellen wie bei LOGIN
+
sub LOGOUT {
my ($msg, $msg_hash, $session_id) = @_;
my $header = @{$msg_hash->{'header'}}[0];
my $source = @{$msg_hash->{'source'}}[0];
my $login = @{$msg_hash->{$header}}[0];
-
- my $sql_statement = "SELECT * FROM known_clients WHERE hostname='$source'";
- my $res = $main::known_clients_db->select_dbentry($sql_statement);
- if( 1 != keys(%$res) ) {
- &main::daemon_log("DEBUG: clMessages.pm: LOGOUT: no or more hits found in known_clients_db for host '$source'");
- return;
- }
-
- my $act_login = $res->{'1'}->{'login'};
- $act_login =~ s/$login,?//gi;
-
- if( $act_login eq "" ){ $act_login = "nobody"; }
-
- $sql_statement = "UPDATE known_clients SET login='$act_login' WHERE hostname='$source'";
- $res = $main::known_clients_db->update_dbentry($sql_statement);
+
+ my $sql_statement = "DELETE FROM $main::login_users_tn WHERE (client='$source' AND user='$login')";
+ my $res = $main::login_users_db->del_dbentry($sql_statement);
+ &main::daemon_log("$session_id INFO: delete user '$login' at client '$source' from login_user_db", 5);
return;
}