Changeset 746 for branches/0.4/web


Ignore:
Timestamp:
03/25/13 17:39:25 (11 years ago)
Author:
ramonb
Message:
  • replaced time intensive for loop
  • only need to check 1 host really
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/0.4/web/addons/job_monarch/libtoga.php

    r745 r746  
    863863                            $domain_len    = 0 - strlen( $domain );
    864864
     865                            $nodekeys     = array_keys( $nodes );
     866
     867                            $first_host    = $nodekeys[0];
    865868                            // Let's see if Ganglia use's FQDN or short hostnames
    866869                            //
    867                             foreach( $nodes as $hostname => $nimage )
     870                            if( substr( $first_host, $domain_len ) != $domain )
    868871                            {
    869                    
    870                                 if( substr( $hostname, $domain_len ) != $domain )
    871                                 {
    872                                     $this->fqdn    = 0;
    873                                 }
     872                                $this->fqdn    = 0;
    874873                            }
    875874                        }
Note: See TracChangeset for help on using the changeset viewer.