use store::audit proxy all over the place
[pxelator] / lib / PXElator / tftpd.pm
index 1a8ca0b..f4a8fde 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 use Net::TFTPd 0.03 qw(%OPCODES);
 use IO::Socket::INET;
 use Data::Dump qw/dump/;
-use CouchDB;
+use store;
 
 use server;
 
@@ -62,7 +62,7 @@ sub tftp_request {
                path => $file,
                state => 'start',
        };
-       CouchDB::audit( $opcode, $audit );
+       store::audit( $opcode, $audit );
 
        progress_bar::start;
 
@@ -71,11 +71,11 @@ sub tftp_request {
                my $size = -s "$dir/$file";
                $audit->{state} = 'finish';
                $audit->{size} = $size;
-               CouchDB::audit( $opcode, $audit );
+               store::audit( $opcode, $audit );
        } else {
                $audit->{state} = 'error';
                $audit->{error} = Net::TFTPd->error;
-               CouchDB::audit( $opcode, $audit );
+               store::audit( $opcode, $audit );
        }
 
 }
@@ -118,7 +118,7 @@ sub start {
 
        warn 'listener: ',dump( $listener ) if $debug;
 
-       CouchDB::audit( 'start', {
+       store::audit( 'start', {
                addr => $listener->{LocalAddr},
                port => $listener->{LocalPort},
                timeout => $listener->{Timeout},