diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl index 10abe418c2..282121d69d 100755 --- a/tests/ftpserver.pl +++ b/tests/ftpserver.pl @@ -670,7 +670,7 @@ sub protocolsetup { } } -# Perform the disconnecgt handshake with sockfilt on the secondary connection +# Perform the disconnect handshake with sockfilt on the secondary connection # (the only connection we actively disconnect). # This involves waiting for the disconnect acknowledgment after the DISC # command, while throwing away anything else that might come in before @@ -690,9 +690,8 @@ sub disc_handshake { $size = hex($1); } - read_datasockf(\$line, $size); - logmsg "> Throwing away $size bytes on closed connection\n"; + read_datasockf(\$line, $size); } elsif($line eq "DISC\n") { logmsg "Fancy that; client wants to DISC, too\n"; diff --git a/tests/server/sockfilt.c b/tests/server/sockfilt.c index 8d9d13b4f4..0e31dfcd4d 100644 --- a/tests/server/sockfilt.c +++ b/tests/server/sockfilt.c @@ -921,11 +921,10 @@ static bool disc_handshake(void) } else if(!memcmp("DATA", buffer, 4)) { /* We must read more data to stay in sync */ + logmsg("Throwing away %zd data bytes", buffer_len); if(!read_data_block(buffer, sizeof(buffer), &buffer_len)) return FALSE; - logmsg("Throwing again %zd data bytes", buffer_len); - } else if(!memcmp("QUIT", buffer, 4)) { /* just die */