display table header from package keys
[pxelator] / lib / PXElator / tftpd.pm
index a0f9070..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;
 
@@ -59,10 +59,10 @@ sub tftp_request {
        my $audit = {
                ip => $ip,
                opcode => $opcode,
-               file => $file,
+               path => $file,
                state => 'start',
        };
-       CouchDB::audit( $opcode, $audit );
+       store::audit( $opcode, $audit );
 
        progress_bar::start;
 
@@ -71,12 +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 );
-               $request->processRQ();
+               store::audit( $opcode, $audit );
        }
 
 }
@@ -110,8 +109,8 @@ sub start {
 
                CallBack => \&transfer_status,
 #              BlkSize => 8192,
-#              BlkSize => 512,
-               BlkSize => 1456,        # IBM GE seems to be picky
+               BlkSize => 512,         # Dell's RAC doesn't like bigger packets
+#              BlkSize => 1456,        # IBM GE seems to be picky
                Debug => 99,
                %params, # merge user parameters
                _UDPSERVER_ => $udpserver,
@@ -119,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},