mirror of https://github.com/moparisthebest/curl
the custom reply engine was not inited properly
This commit is contained in:
parent
d830f10417
commit
6429c378a2
|
@ -76,6 +76,7 @@ my %commandok = (
|
||||||
'SIZE' => 'loggedin|twosock',
|
'SIZE' => 'loggedin|twosock',
|
||||||
'PWD' => 'loggedin|twosock',
|
'PWD' => 'loggedin|twosock',
|
||||||
'QUIT' => 'loggedin|twosock',
|
'QUIT' => 'loggedin|twosock',
|
||||||
|
'DELE' => 'loggedin|twosock'
|
||||||
);
|
);
|
||||||
|
|
||||||
# initially, we're in 'fresh' state
|
# initially, we're in 'fresh' state
|
||||||
|
@ -97,6 +98,7 @@ my %displaytext = ('USER' => '331 We are happy you popped in!',
|
||||||
'QUIT' => '221 bye bye baby', # just reply something
|
'QUIT' => '221 bye bye baby', # just reply something
|
||||||
'PWD' => '257 "/nowhere/anywhere" is current directory',
|
'PWD' => '257 "/nowhere/anywhere" is current directory',
|
||||||
'REST' => '350 Yeah yeah we set it there for you',
|
'REST' => '350 Yeah yeah we set it there for you',
|
||||||
|
'DELE' => '200 OK OK OK whatever you say'
|
||||||
);
|
);
|
||||||
|
|
||||||
# callback functions for certain commands
|
# callback functions for certain commands
|
||||||
|
@ -300,6 +302,7 @@ $SIG{CHLD} = \&REAPER;
|
||||||
|
|
||||||
my %customreply;
|
my %customreply;
|
||||||
sub customize {
|
sub customize {
|
||||||
|
undef %customreply;
|
||||||
open(CUSTOM, "<log/ftpserver.cmd") ||
|
open(CUSTOM, "<log/ftpserver.cmd") ||
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
@ -307,7 +310,6 @@ sub customize {
|
||||||
print STDERR "FTPD: Getting commands from log/ftpserver.cmd\n";
|
print STDERR "FTPD: Getting commands from log/ftpserver.cmd\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
undef %customreply;
|
|
||||||
while(<CUSTOM>) {
|
while(<CUSTOM>) {
|
||||||
if($_ =~ /REPLY ([A-Z]+) (.*)/) {
|
if($_ =~ /REPLY ([A-Z]+) (.*)/) {
|
||||||
$customreply{$1}=$2;
|
$customreply{$1}=$2;
|
||||||
|
|
Loading…
Reference in New Issue