smtp-layer: add MAIL FROM parsing test in unittest

pull/1671/head
Eric Leblond 10 years ago
parent 534360fc02
commit fbd6428f1b

@ -4538,6 +4538,16 @@ int SMTPParserTest14(void)
SCMutexUnlock(&f.m);
goto end;
}
if ((smtp_state->curr_tx->mail_from_len != 14) ||
strncmp("asdff@asdf.com", (char *)smtp_state->curr_tx->mail_from, 14)) {
printf("incorrect parsing of MAIL FROM field '%s' (%d)\n",
smtp_state->curr_tx->mail_from,
smtp_state->curr_tx->mail_from_len);
SCMutexUnlock(&f.m);
goto end;
}
SCMutexUnlock(&f.m);
if (smtp_state->input_len != 0 ||
smtp_state->cmds_cnt != 0 ||

Loading…
Cancel
Save