For request side, having a tx means the request is done.
For response, wait for tx to be marked complete.
Remove unused states.
#[repr(u8)]
#[allow(non_camel_case_types)]
pub enum FtpStateValues {
- FTP_STATE_NONE,
FTP_STATE_IN_PROGRESS,
- FTP_STATE_PORT_DONE,
FTP_STATE_FINISHED,
}
// FTP Data progress values
SCLogDebug("tx %p", vtx);
FTPTransaction *tx = vtx;
+ /* having a tx implies request side is done */
+ if (direction == STREAM_TOSERVER) {
+ return FTP_STATE_FINISHED;
+ }
if (!tx->done) {
- if (direction == STREAM_TOSERVER &&
- tx->command_descriptor.command_code == FTP_COMMAND_PORT) {
- return FTP_STATE_PORT_DONE;
- }
return FTP_STATE_IN_PROGRESS;
}