summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 71ef4c0)
raw | patch | inline | side by side (parent: 71ef4c0)
author | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 31 Jan 2008 09:37:54 +0000 (09:37 +0000) | ||
committer | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 31 Jan 2008 09:37:54 +0000 (09:37 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8695 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/modules/ArpHandler.pm | patch | blob | history |
index 1384e60a1a1f96c74bd2d474f734d279fe39ad90..009d23cb5be67ebf6464a30f7979eec31d29f2aa 100644 (file)
my $s_res = &search_ldap_entry($ldap_tree, $ldap_base, "(|(macAddress=$mac)(dhcpHWAddress=ethernet $mac))");
my $c_res = (defined $s_res)?$s_res->count:0;
if($c_res == 0) {
- daemon_log("WARNING: macAddress $mac not in LDAP", 1);
+ &main::daemon_log("WARNING: macAddress $mac not in LDAP", 1);
return;
} elsif($c_res > 1) {
- daemon_log("ERROR: macAddress $mac exists $c_res times in LDAP", 1);
+ &main::daemon_log("ERROR: macAddress $mac exists $c_res times in LDAP", 1);
return;
}
my $result = $ldap->modify( $dn, replace => $replace );
# for $result->code constants please look at Net::LDAP::Constant
- my $log_time = localtime( time );
if($result->code == 32) { # entry doesnt exists
&add_ldap_entry($mac, $gotoSysStatus);
} elsif($result->code == 0) { # everything went fine
- daemon_log("$log_time: entry $dn changed successful", 1);
+ &main::daemon_log("entry $dn changed successful", 1);
} else { # if any other error occur
- daemon_log("ERROR: $log_time: $dn, ".$result->code.", ".$result->error, 1);
+ &main::daemon_log("ERROR: $dn, ".$result->code.", ".$result->error, 1);
}
return;
$msg = $ldap_tree->search( # perform a search
base => $sub_tree,
filter => $search_string,
- ) or daemon_log("cannot perform search at ldap: $@", 1);
+ ) or &main::daemon_log("cannot perform search at ldap: $@", 1);
#if(defined $msg) {
# print $sub_tree."\t".$search_string."\t";
# print $msg->count."\n";