From e28cf797754fac852856edfe14b2eb5c19badbd8 Mon Sep 17 00:00:00 2001 From: cajus Date: Tue, 15 Jul 2008 06:53:19 +0000 Subject: [PATCH] Revert parts of the change. No access to HEAP at this point... :-( git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11640 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/modules/ClientPackages.pm | 14 +++++++------- gosa-si/server/events/siTriggered.pm | 12 ++++++------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/gosa-si/modules/ClientPackages.pm b/gosa-si/modules/ClientPackages.pm index f89362a97..8d4b7e805 100644 --- a/gosa-si/modules/ClientPackages.pm +++ b/gosa-si/modules/ClientPackages.pm @@ -410,7 +410,7 @@ sub new_key { # DESCRIPTION: process this incoming message #=============================================================================== sub here_i_am { - my ($heap, $msg, $msg_hash, $session_id) = @_[HEAP, ARG0, ARG1, ARG2]; + my ($msg, $msg_hash, $session_id) = @_; my @out_msg_l; my $out_hash; my $source = @{$msg_hash->{source}}[0]; @@ -421,12 +421,12 @@ sub here_i_am { my $key_lifetime = @{$msg_hash->{key_lifetime}}[0]; # Move forced hostname to heap - if used - if ( defined($msg_hash->{'force-hostname'}[0]) && - length($msg_hash->{'force-hostname'}[0]) > 0){ - $heap->{force-hostname}->{$mac_address}= $msg_hash->{'force-hostname'}[0]; - } else { - $heap->{force-hostname}->{$mac_address}= undef; - } + #if ( defined($msg_hash->{'force-hostname'}[0]) && + # length($msg_hash->{'force-hostname'}[0]) > 0){ + # $heap->{force-hostname}->{$mac_address}= $msg_hash->{'force-hostname'}[0]; + #} else { + # $heap->{force-hostname}->{$mac_address}= undef; + #} # number of known clients my $nu_clients= $main::known_clients_db->count_dbentries('known_clients'); diff --git a/gosa-si/server/events/siTriggered.pm b/gosa-si/server/events/siTriggered.pm index 4cab90788..e1635269a 100644 --- a/gosa-si/server/events/siTriggered.pm +++ b/gosa-si/server/events/siTriggered.pm @@ -123,7 +123,7 @@ sub got_ping { sub detected_hardware { - my ($heap, $msg, $msg_hash, $session_id) = @_[HEAP, ARG0, ARG1, ARG2]; + my ($msg, $msg_hash, $session_id) = @_; my $address = $msg_hash->{source}[0]; my $header = $msg_hash->{header}[0]; my $gotoHardwareChecksum= $msg_hash->{detected_hardware}[0]->{gotoHardwareChecksum}; @@ -164,12 +164,12 @@ sub detected_hardware { &main::daemon_log("INFO: Need to create a new LDAP Entry for client $address", 4); my $ipaddress= $1 if $address =~ /^([0-9\.]*?):.*$/; my $dnsname; - if ( defined($heap->{force-hostname}->{$macaddress}) ){ - $dnsname= $heap->{force-hostname}->{$macaddress}; - &main::daemon_log("INFO: Using forced hostname $dnsname for client $address", 4); - } else { + #if ( defined($heap->{force-hostname}->{$macaddress}) ){ + # $dnsname= $heap->{force-hostname}->{$macaddress}; + # &main::daemon_log("INFO: Using forced hostname $dnsname for client $address", 4); + #} else { $dnsname= gethostbyaddr(inet_aton($ipaddress), AF_INET) || $ipaddress; - } + #} my $cn = (($dnsname =~ /^(\d){1,3}\.(\d){1,3}\.(\d){1,3}\.(\d){1,3}/) ? $dnsname : sprintf "%s", $dnsname =~ /([^\.]+)\.?/); my $dn = "cn=$cn,ou=incoming,$ldap_base"; -- 2.30.2