From 8b58371130a92bf6d14221ebc14e02aaf90e2748 Mon Sep 17 00:00:00 2001 From: rettenbe Date: Mon, 2 Jun 2008 17:01:23 +0000 Subject: [PATCH] * under construction git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11157 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/server/events/gosaTriggered.pm | 6 ++++++ gosa-si/tests/client.php | 1 + 2 files changed, 7 insertions(+) diff --git a/gosa-si/server/events/gosaTriggered.pm b/gosa-si/server/events/gosaTriggered.pm index da0ee258c..0294fb325 100644 --- a/gosa-si/server/events/gosaTriggered.pm +++ b/gosa-si/server/events/gosaTriggered.pm @@ -368,15 +368,21 @@ sub ping { #if ($error != 0) {} my $message_id; + my $i = 0; while (1) { + $i++; $sql = "SELECT * FROM $main::incoming_tn WHERE headertag='answer_$session_id'"; $res = $main::incoming_db->exec_statement($sql); if (ref @$res[0] eq "ARRAY") { $message_id = @{@$res[0]}[0]; last; } + + # do not run into a endless loop + if ($i > 100) { last; } usleep(100000); } + my $answer_xml = @{@$res[0]}[3]; my %data = ( 'answer_xml' => 'bin noch da' ); my $answer_msg = &build_msg("got_ping", $target, $source, \%data); diff --git a/gosa-si/tests/client.php b/gosa-si/tests/client.php index 580bc8e35..49d8ed768 100755 --- a/gosa-si/tests/client.php +++ b/gosa-si/tests/client.php @@ -107,6 +107,7 @@ for($count = 1; $count <= $zahl; $count++) #$data = "
gosa_query_fai_server
GOSA 10.89.1.131:20081
"; $data = "
gosa_ping
00:01:6c:9d:aa:16 GOSA
"; + #$data = "
gosa_ping
00:01:6c:9d:b9:fa GOSA
"; #$data = "
job_ping
GOSA 00:0c:29:02:e5:4d 00:0c:29:02:e5:4d29700101000000
"; $sock->write($data); -- 2.30.2