summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a90bddd)
raw | patch | inline | side by side (parent: a90bddd)
author | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 2 Jun 2008 17:01:23 +0000 (17:01 +0000) | ||
committer | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 2 Jun 2008 17:01:23 +0000 (17:01 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11157 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/server/events/gosaTriggered.pm | patch | blob | history | |
gosa-si/tests/client.php | patch | blob | history |
index da0ee258cb90f3d70c06b7c8f88dafbd4c3a9b95..0294fb3258113869d35d3ee22ad0ff430370950e 100644 (file)
#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);
index 580bc8e350b29276056b8d6fa54f90ac3f3926e5..49d8ed7681eb2f7c92434d5f84243176ed610c41 100755 (executable)
--- a/gosa-si/tests/client.php
+++ b/gosa-si/tests/client.php
#$data = "<xml><header>gosa_query_fai_server</header><source>GOSA</source> <target>10.89.1.131:20081</target></xml>";
$data = "<xml> <header>gosa_ping</header> <target>00:01:6c:9d:aa:16</target> <source>GOSA</source> </xml>";
+ #$data = "<xml> <header>gosa_ping</header> <target>00:01:6c:9d:b9:fa</target> <source>GOSA</source> </xml>";
#$data = "<xml> <header>job_ping</header> <source>GOSA</source> <target>00:0c:29:02:e5:4d</target> <macaddress>00:0c:29:02:e5:4d</macaddress><timestamp>29700101000000</timestamp> </xml>";
$sock->write($data);