X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=lib%2FZOOM%2FIRSpy%2FTest%2FSearch%2FDan1.pm;h=9e344e6d925f920f9e1c53aa0ed67aba7f9c8340;hb=661bdf876acd181b2435f475a59524730eb2f2c3;hp=f435ba9c02212e7748e62595ca448a1ecfc9448a;hpb=afad23c81cfde1bf74c4582b987f9e256fdb89c4;p=irspy-moved-to-github.git
diff --git a/lib/ZOOM/IRSpy/Test/Search/Dan1.pm b/lib/ZOOM/IRSpy/Test/Search/Dan1.pm
index f435ba9..9e344e6 100644
--- a/lib/ZOOM/IRSpy/Test/Search/Dan1.pm
+++ b/lib/ZOOM/IRSpy/Test/Search/Dan1.pm
@@ -1,4 +1,4 @@
-# $Id: Dan1.pm,v 1.1 2006-10-13 13:40:29 sondberg Exp $
+# $Id: Dan1.pm,v 1.4 2006-10-26 10:24:20 sondberg Exp $
# See the "Main" test package for documentation
@@ -20,7 +20,7 @@ sub start {
foreach my $attr (@attrs) {
$conn->irspy_search_pqf("\@attr dan1 1=$attr mineral",
- {'attr' => $attr},
+ {'attr' => $attr}, {},
ZOOM::Event::RECV_SEARCH, \&found,
exception => \&error);
}
@@ -34,10 +34,7 @@ sub found {
$conn->log("irspy_test", "search on access-point $attr found $n record",
$n==1 ? "" : "s");
- $conn->record()->append_entry("irspy:status",
- "".
- isodate(time()) .
- "");
+ update($conn, $attr, 1);
return ZOOM::IRSpy::Status::TASK_DONE;
}
@@ -49,12 +46,21 @@ sub error {
$conn->log("irspy_test", "search on access-point $attr had error: ",
$exception);
- $conn->record()->append_entry("irspy:status",
- "".
- isodate(time()) .
- "");
+ update($conn, $attr, 0);
+
return ZOOM::IRSpy::Status::TASK_DONE;
}
+sub update {
+ my ($conn, $attr, $ok) = @_;
+
+ $conn->record()->store_result('search', 'set' => 'dan1',
+ 'ap' => $attr,
+ 'ok' => $ok);
+}
+
+
+
+
1;