From: rettenbe Date: Mon, 21 Jul 2008 09:02:48 +0000 (+0000) Subject: * closes #508 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=af1a821c1149c5ba76f6dfcdc0bb28928577a91f;p=gosa.git * closes #508 * catching an error git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11724 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-si/server/events/gosaTriggered.pm b/gosa-si/server/events/gosaTriggered.pm index 6d969a180..495f4ce40 100644 --- a/gosa-si/server/events/gosaTriggered.pm +++ b/gosa-si/server/events/gosaTriggered.pm @@ -298,15 +298,19 @@ sub ping { usleep(100000); } - my $answer_xml = @{@$res[0]}[3]; - my %data = ( 'answer_xml' => 'bin noch da' ); - $answer_msg = &build_msg("got_ping", $target, $source, \%data); - my $forward_to_gosa = @{$msg_hash->{'forward_to_gosa'}}[0]; - if (defined $forward_to_gosa){ - $answer_msg =~s/<\/xml>/$forward_to_gosa<\/forward_to_gosa><\/xml>/; + # if an answer to the question exists + if (defined $message_id) { + my $answer_xml = @{@$res[0]}[3]; + my %data = ( 'answer_xml' => 'bin noch da' ); + $answer_msg = &build_msg("got_ping", $target, $source, \%data); + my $forward_to_gosa = @{$msg_hash->{'forward_to_gosa'}}[0]; + if (defined $forward_to_gosa){ + $answer_msg =~s/<\/xml>/$forward_to_gosa<\/forward_to_gosa><\/xml>/; + } + $sql = "DELETE FROM $main::incoming_tn WHERE id=$message_id"; + $res = $main::incoming_db->exec_statement($sql); } - $sql = "DELETE FROM $main::incoming_tn WHERE id=$message_id"; - $res = $main::incoming_db->exec_statement($sql); + } return ( $answer_msg );