From 6643547736a1aa56d9488835c13979d4bd9360d8 Mon Sep 17 00:00:00 2001 From: Tomas Plesnik <plesnik@ics.muni.cz> Date: Thu, 15 Jan 2015 08:25:49 +0100 Subject: [PATCH] zmena volani funkce getNewEvents; pridan modul warnings; uprava data --- src/warden-client/bin/receiver.pl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/warden-client/bin/receiver.pl b/src/warden-client/bin/receiver.pl index b5d1b3e..696ecab 100755 --- a/src/warden-client/bin/receiver.pl +++ b/src/warden-client/bin/receiver.pl @@ -1,10 +1,11 @@ -#!/usr/bin/perl -w +#!/usr/bin/perl # -# Copyright (C) 2011-2013 Cesnet z.s.p.o +# Copyright (C) 2011-2015 Cesnet z.s.p.o # # Use of this source is governed by a BSD-style license, see LICENSE file. use strict; +use warnings; #------------------------------------------------------------------------------ # Warden 2.2 Client, Receiver, Example @@ -21,7 +22,7 @@ use strict; my $warden_path = '/opt/warden-client/'; # Inclusion of warden-client receiving functionality -require $warden_path . '/lib/WardenClientReceive.pm'; +require $warden_path . '/lib/WardenClient.pm'; # Definition of requested event type. This attributes is also set on server # and must not change. @@ -35,7 +36,7 @@ print "| id | hostname | service | detected | type | source_type | source | targ print "+------------------------------------------------------------------------------------------------------------------------------------------+\n"; # Download of new evetns from Warden server -while (my @new_events = WardenClientReceive::getNewEvents($warden_path, $requested_type)) { +while (my @new_events = WardenClient::getNewEvents($requested_type)) { foreach my $event_ref (@new_events) { my @event = @$event_ref; print "| " . join(' | ', map { $_ || '' } @event) . " |" . "\n"; -- GitLab