8 |
|
|
9 |
use server; |
use server; |
10 |
|
|
11 |
|
our $debug = server::debug; |
12 |
|
|
13 |
our $dir = "$server::base_dir/tftp"; |
our $dir = "$server::base_dir/tftp"; |
14 |
|
|
15 |
sub path { |
sub path { |
16 |
my $glob = shift; |
my $glob = shift; |
17 |
my $path = glob("$dir/$glob"); |
my $path = (glob("$dir/$glob"))[0]; |
18 |
die "can't find anything for $dir/$glob" unless $path; |
die "can't find anything for $dir/$glob" unless $path; |
19 |
warn $path; |
warn $path; |
20 |
$path =~ s{^$dir}{}; |
$path =~ s{^$dir}{}; |
73 |
Debug => 99, |
Debug => 99, |
74 |
) || die Net::TFTPd->error; |
) || die Net::TFTPd->error; |
75 |
|
|
76 |
warn 'listener: ',dump( $listener ); |
warn 'listener: ',dump( $listener ) if $debug; |
77 |
|
|
78 |
while(1) { |
while(1) { |
79 |
|
|