summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b0013c4)
raw | patch | inline | side by side (parent: b0013c4)
author | psc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 28 Jun 2011 14:38:04 +0000 (14:38 +0000) | ||
committer | psc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 28 Jun 2011 14:38:04 +0000 (14:38 +0000) |
Overhaul fifo socket handling: open and immediately close the fifo
when printing the logged in users. Also print the socket messages
arriving at the client side at the default INFO loglevel
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@20926 594d385d-05f5-0310-b6e9-bd551577e9d8
when printing the logged in users. Also print the socket messages
arriving at the client side at the default INFO loglevel
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@20926 594d385d-05f5-0310-b6e9-bd551577e9d8
trunk/gosa-si/gosa-si-client | patch | blob | history |
index 36b55f5227841a6d15fdf7e28e6d11ecb409ea24..9ee49e936f764ea16fdd3dd501b6299d00869b87 100755 (executable)
our $server_key;
our $opts_dnslookup;
-our $FIFO_FD = undef;
-
# default variables
our $REGISTERED = 0;
our $REGISTRATION_IN_PROGRESS = 0;
@logged_in_user_list = split(/\s/, $result);
}
- $FIFO_FD = undef
- if (! defined $FIFO_FD && ! defined open($FIFO_FD, '>', $gosa_si_client_fifo));
- if (! defined $FIFO_FD) {
+ if (!open(FIFO_FD, '>', $gosa_si_client_fifo)) {
daemon_log("ERROR: unable to open fifo for writing: $!", 1);
$kernel->delay_set('trigger_logged_in_users_report', 30);
}
else {
- print($FIFO_FD 'CURRENTLY_LOGGED_IN ' . join(" ", @logged_in_user_list)."\n");
- close($FIFO_FD);
- my $userlist = join(" ", @logged_in_user_list);
- daemon_log("DEBUG: Sent logged in user list to server: $userlist", 5);
+ printf(FIFO_FD "CURRENTLY_LOGGED_IN %s\n", join(" ", @logged_in_user_list));
+ close(FIFO_FD);
$kernel->delay_set('trigger_logged_in_users_report', $trigger_logged_in_users_report_delay);
}
} else {
my $file_record = $_[ARG0];
my $header;
my $content = "";
- daemon_log("DEBUG: fifo got record: $file_record", 7);
+ daemon_log("INFO: fifo got record: $file_record", 3);
$file_record =~ /^(\S+)[ ]?([\s\S]+)?$/;
if( defined $1 ) {
$kernel->alias_remove($heap->{alias});
$kernel->alarm_remove_all();
$kernel->post($heap->{child_session}, '_stop');
- close( $FIFO_FD ) if( defined $FIFO_FD );
}