index 265b72416811b3e02254709ee2649e8b73710a31..4e8705902fa71a76c43613b132a95b8730de400d 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 {
eval{ require $event; };
if( $@ ) {
- &main::daemon_log("import of event module '$event' failed", 1);
+ &main::daemon_log("S ERROR: import of event module '$event' failed", 1);
&main::daemon_log("$@", 8);
next;
}
# check hit
my $hit_counter = keys %{$res};
if( not $hit_counter == 1 ) {
- &main::daemon_log("ERROR: more or no hit found in known_clients_db by query by '$address'", 1);
+ &main::daemon_log("$session_id ERROR: more or no hit found in known_clients_db by query by '$address'", 1);
}
my $macaddress = $res->{1}->{macaddress};
my $hostkey = $res->{1}->{hostkey};
if (not defined $macaddress) {
- &main::daemon_log("ERROR: no mac address found for client $address", 1);
+ &main::daemon_log("$session_id ERROR: no mac address found for client $address", 1);
return;
}
# Build LDAP connection
my $ldap_handle = &main::get_ldap_handle($session_id);
if( not defined $ldap_handle ) {
- &main::daemon_log("ERROR: cannot connect to ldap: $ldap_uri", 1);
+ &main::daemon_log("$session_id ERROR: cannot connect to ldap: $ldap_uri", 1);
return;
}