From 0d4c13afc9eb8f54f59c43876bce486b7d1f9288 Mon Sep 17 00:00:00 2001
From: Tomas Plesnik <plesnik@ics.muni.cz>
Date: Wed, 29 Feb 2012 15:29:04 +0100
Subject: [PATCH] oprava neciselneho argumentu pro funkci sprintf v promenne

---
 src/warden-client/bin/sender.pl             | 5 ++---
 src/warden-client/doc/example-sender.pl.txt | 5 +++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/warden-client/bin/sender.pl b/src/warden-client/bin/sender.pl
index f5e32ac..caedc70 100755
--- a/src/warden-client/bin/sender.pl
+++ b/src/warden-client/bin/sender.pl
@@ -46,8 +46,7 @@ switch (int(rand(2) + 0.5)) {
   case 2 { $service = 'HoneyScan'; }
   }
 
-my $local_detected = time();
-my $detected = DateTime->from_epoch(epoch => $local_detected);
+my $detected = DateTime->from_epoch(epoch => time());
 
 my $type = "";
 switch (int(rand(9) + 0.5)) {
@@ -106,7 +105,7 @@ switch (int(rand(1) + 0.5)) {
 
 my @event = (
   $service, # $service
-  $detected, # $detected
+  "$detected", # $detected
   $type, # $type
   $source_type, # $source_type
   $source, # $source
diff --git a/src/warden-client/doc/example-sender.pl.txt b/src/warden-client/doc/example-sender.pl.txt
index 7ac3a41..1a2efb7 100644
--- a/src/warden-client/doc/example-sender.pl.txt
+++ b/src/warden-client/doc/example-sender.pl.txt
@@ -46,10 +46,11 @@ use DateTime;
 # This should be handled by detection application.
 
 
-my $local_detected = time();
+my $local_detected = DateTime->from_epoch(epoch => time());
+
 
 my $service 		= "ScanDetector";
-my $detected 		= DateTime->from_epoch(epoch => $local_detected);
+my $detected 		= "$local_detected";
 my $type 		= "portscan";
 my $source_type 	= "IP";
 my $source 		= "123.123.123.123";
-- 
GitLab