index d6da11d4b204733ac2ee10e7c1a3b1998ba9270e..1b0997dd2453e6273c89cb38df472860de192891 100644 (file)
#===============================================================================
sub read_configfile {
my $cfg;
- if( defined( $main::cfg_file) && ( length($main::cfg_file) > 0 )) {
+ if( defined( $main::cfg_file) && ( (-s $main::cfg_file) > 0 )) {
if( -r $main::cfg_file ) {
$cfg = Config::IniFiles->new( -file => $main::cfg_file );
} else {
&main::daemon_log("Loading OUI cache file suceeded!", 6);
}
}
- my $ldap_handle = &main::get_ldap_handle();
- if(defined($ldap_uri) && length($ldap_uri)>0) {
- if (!$ldap_handle) {
- &main::daemon_log("Could not connect to LDAP Server at $ldap_uri!\n$@", 1);
- }
- } else {
- $ldap_handle= undef;
- }
+ my $ldap_handle = &main::get_ldap_handle();
# When interface is not configured (or 'all'), start arpwatch on all possible interfaces
if ((!defined($arp_interface)) || $arp_interface eq 'all') {
my $mac=shift;
my $result={};
- my $ladp_handle = &get_ldap_handle();
+ my $ldap_handle = &main::get_ldap_handle();
if(defined($ldap_handle)) {
my $ldap_result= &search_ldap_entry(
$ldap_handle,