summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (from parent 1: 9b47c57)
raw | patch | inline | side by side (from parent 1: 9b47c57)
author | psc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 15 Apr 2011 14:16:32 +0000 (14:16 +0000) | ||
committer | psc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 15 Apr 2011 14:16:32 +0000 (14:16 +0000) |
Set $server_ip to public IP if gosa-si-client registers with the
server on the same host. Fix an off-by-one error when detecting
whether registering with all servers has been tried. Do not discard
messages from 127.0.0.1
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@20738 594d385d-05f5-0310-b6e9-bd551577e9d8
server on the same host. Fix an off-by-one error when detecting
whether registering with all servers has been tried. Do not discard
messages from 127.0.0.1
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@20738 594d385d-05f5-0310-b6e9-bd551577e9d8
trunk/gosa-si/gosa-si-client | patch | blob | history |
index 6d7c808b512dd3794b70d8acc62c2b64f9b2d382..fa7aecce8c666602ee5454ca925d37b1e76c74ae 100755 (executable)
last;
# delivery of registration msg failed
- } elsif($REGISTRATION_TRIES >= scalar(@servers)) {
+ } elsif($REGISTRATION_TRIES > scalar(@servers)) {
last;
}
} # end of while
# one circle through all servers finished and no registration succeed
- if ( $REGISTRATION_TRIES >= (scalar(@servers)) ) {
+ if ( $REGISTRATION_TRIES > (scalar(@servers)) ) {
$REGISTRATION_TRIES = 0;
&write_to_file("gosa-si-no-server-available", $fai_logpath);
daemon_log("WARNING: Could not register with any of the servers, waiting $delay_set_time seconds",3);
my $msg_hash;
- daemon_log("INFO: Incoming msg from '$remote_ip'", 5);
+ daemon_log("INFO: Incoming msg from '$remote_ip', server_ip: $server_ip", 5);
daemon_log("DEBUG: Incoming msg:\n$input\n", 9);
- if (not "$remote_ip" eq "$server_ip") {
- daemon_log("INFO: Incoming msg not from server, ignoring", 5);
+ if (not "$remote_ip" eq "$server_ip" and "$server_ip" ne "127.0.0.1") {
+ daemon_log("INFO: Incoming msg not from server ($server_ip), ignoring", 5);
$error++;
} else {
($msg, $msg_hash) = &check_key_and_xml_validity($input, $server_key);
# set registered flag to true to stop sending further registered msgs
$REGISTERED = 1;
$REGISTRATION_IN_PROGRESS = 0;
+ if( $server_ip eq "127.0.0.1") {
+ $server_ip = $remote_ip;
+ daemon_log("INFO: Registered at localhost, setting server_ip to $server_ip",3);
+ }
}
else {
$answer =~ /<header>(\S+)<\/header>/;