Updated the ftp response handler to return without doing anything.

Currently the processing happening inside the handler is not being used
anywhere else in the engine.
pull/680/head
Anoop Saldanha 11 years ago committed by Victor Julien
parent 8523cbadcf
commit 80c08f8642

@ -199,31 +199,6 @@ static int FTPParseResponse(Flow *f, void *ftp_state, AppLayerParserState *pstat
uint8_t *input, uint32_t input_len,
void *local_data, AppLayerParserResult *output)
{
SCEnter();
//PrintRawDataFp(stdout, input,input_len);
uint32_t offset = 0;
FtpState *fstate = (FtpState *)ftp_state;
if (pstate == NULL)
return -1;
const uint8_t delim[] = { 0x0D, 0x0A };
int r = AlpParseFieldByDelimiter(output, pstate, FTP_FIELD_RESPONSE_LINE,
delim, sizeof(delim), input, input_len,
&offset);
if (r == 0) {
pstate->parse_field = 0;
return 0;
}
char rcode[5];
memcpy(rcode, input, 4);
rcode[4] = '\0';
fstate->response_code = atoi(rcode);
SCLogDebug("Response: %u\n", fstate->response_code);
pstate->parse_field = 0;
return 1;
}

@ -95,7 +95,6 @@ enum {
typedef struct FtpState_ {
FtpRequestCommand command;
FtpRequestCommandArgOfs arg_offset;
FtpResponseCode response_code;
uint32_t port_line_len;
uint8_t *port_line;
} FtpState;

Loading…
Cancel
Save