summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1f1c320)
raw | patch | inline | side by side (parent: 1f1c320)
author | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 22 Apr 2008 07:13:25 +0000 (07:13 +0000) | ||
committer | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 22 Apr 2008 07:13:25 +0000 (07:13 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10599 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/gosa-si-server | patch | blob | history | |
gosa-si/modules/ArpHandler.pm | patch | blob | history |
diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server
index 649ad70c5bd3ea5aa635874389bfdc031a5a1901..0f3b33c9e8a1d184cf111b9d48064b50ef0687e0 100755 (executable)
--- a/gosa-si/gosa-si-server
+++ b/gosa-si/gosa-si-server
foreach my $hit (reverse @{$res} ) {
my $macaddress= lc @{$hit}[8];
my $headertag= @{$hit}[5];
- if(defined($hits->{$macaddress}->{$headertag})) {
+ if(
+ defined($hits->{$macaddress}) &&
+ defined($hits->{$macaddress}->{$headertag}) &&
+ defined($hits->{$macaddress}->{$headertag}[0])
+ ) {
push @drops, "DELETE FROM $job_queue_tn WHERE id = '$hits->{$macaddress}->{$headertag}[0]'";
}
$hits->{$macaddress}->{$headertag}= $hit;
foreach my $macaddress (keys %{$hits}) {
foreach my $jobdb_headertag (keys %{$hits->{$macaddress}}) {
my $jobdb_id = @{$hits->{$macaddress}->{$jobdb_headertag}}[0];
- my $sql_statement = "SELECT * FROM $job_queue_tn WHERE macaddress LIKE '$macaddress' AND headertag='$jobdb_headertag' AND status='processing'";
- my $res = $job_db->exec_statement( $sql_statement );
- foreach my $hit (@{$res}) {
- push @drops, "DELETE FROM $job_queue_tn WHERE id = '$jobdb_id'";
+ if(defined($job_db_id)) {
+ my $sql_statement = "SELECT * FROM $job_queue_tn WHERE macaddress LIKE '$macaddress' AND headertag='$jobdb_headertag' AND status='processing'";
+ my $res = $job_db->exec_statement( $sql_statement );
+ foreach my $hit (@{$res}) {
+ push @drops, "DELETE FROM $job_queue_tn WHERE id = '$jobdb_id'";
+ }
+ } else {
+ daemon_log("J ERROR: Job without id exists for macaddress $macaddress!", 1);
}
}
}
}
}
} else {
- &main::daemon_log("$session_id ERROR: something wrong with ldap_server_dn '$ldap_server_dn', abort create_soureces_list", 1);
+ &main::daemon_log("$session_id ERROR: something wrong with ldap_server_dn '$ldap_server_dn', abort create_sources_list", 1);
}
close($fh);
index 549afed52654af7c984695dd13a3d53f57af569b..1b0997dd2453e6273c89cb38df472860de192891 100644 (file)
my $mac=shift;
my $result={};
- my $ldap_handle = &get_ldap_handle();
+ my $ldap_handle = &main::get_ldap_handle();
if(defined($ldap_handle)) {
my $ldap_result= &search_ldap_entry(
$ldap_handle,