Merge branch 'master' of ssh://git.indexdata.com:222/home/git/pub/irspy
[irspy-moved-to-github.git] / lib / ZOOM / IRSpy / Record.pm
index b0b0bfd..29160ec 100644 (file)
@@ -41,6 +41,7 @@ sub new {
        target => $target,
        parser => $parser,
        zeerex => $parser->parse_string($zeerex)->documentElement(),
+       zoom_error => { TIMEOUT => 0 },
     }, $class;
 
     #Scalar::Util::weaken($this->{irspy});
@@ -49,6 +50,7 @@ sub new {
     return $this;
 }
 
+sub zoom_error { return shift->{'zoom_error'} }
 
 sub _empty_zeerex_record {
     my($target) = @_;
@@ -115,9 +117,10 @@ sub store_result {
         $xml .= " $key=\"" . xml_encode($info{$key}) . "\"";
     }
 
-    $xml .= ">" . isodate(time()) . "</irspy:$type>\n";
+    $xml .= ">" . isodate(time()) . "</irspy:$type>";
 
-    $this->append_entry('irspy:status', $xml);
+    $this->{irspy}->log("irspy_data", $xml);
+    $this->append_entry('irspy:status', $xml . "\n");
 }