Code

Revert parts of the change.
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 15 Jul 2008 06:53:19 +0000 (06:53 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 15 Jul 2008 06:53:19 +0000 (06:53 +0000)
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
gosa-si/server/events/siTriggered.pm

index f89362a970197978da2dfd7c127c73dc5d7026fc..8d4b7e805fb482cc227fdbd5841138a50c759ced 100644 (file)
@@ -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');
index 4cab907882a7b24bbfed00647c8331795a134fd3..e1635269adcc77c1f73b15eaedb86e5a14aa29f2 100644 (file)
@@ -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";