@ -1432,7 +1432,7 @@ static AppLayerResult SMTPParseServerRecord(Flow *f, void *alstate,
* \ internal
* \ brief Function to allocate SMTP state memory .
*/
void * SMTPStateAlloc ( void )
void * SMTPStateAlloc ( void * orig_state , AppProto proto_orig )
{
SMTPState * smtp_state = SCMalloc ( sizeof ( SMTPState ) ) ;
if ( unlikely ( smtp_state = = NULL ) )
@ -5154,7 +5154,7 @@ static int SMTPProcessDataChunkTest02(void){
memset ( & ssn , 0 , sizeof ( ssn ) ) ;
FLOW_INITIALIZE ( & f ) ;
f . protoctx = & ssn ;
f . alstate = SMTPStateAlloc ( ) ;
f . alstate = SMTPStateAlloc ( NULL , ALPROTO_UNKNOWN ) ;
MimeDecParseState * state = MimeDecInitParser ( & f , NULL ) ;
( ( MimeDecEntity * ) state - > stack - > top - > data ) - > ctnt_flags = CTNT_IS_ATTACHMENT ;
state - > body_begin = 1 ;
@ -5185,7 +5185,7 @@ static int SMTPProcessDataChunkTest03(void){
Flow f ;
FLOW_INITIALIZE ( & f ) ;
f . protoctx = & ssn ;
f . alstate = SMTPStateAlloc ( ) ;
f . alstate = SMTPStateAlloc ( NULL , ALPROTO_UNKNOWN ) ;
MimeDecParseState * state = MimeDecInitParser ( & f , NULL ) ;
( ( MimeDecEntity * ) state - > stack - > top - > data ) - > ctnt_flags = CTNT_IS_ATTACHMENT ;
int ret ;
@ -5241,7 +5241,7 @@ static int SMTPProcessDataChunkTest04(void){
Flow f ;
FLOW_INITIALIZE ( & f ) ;
f . protoctx = & ssn ;
f . alstate = SMTPStateAlloc ( ) ;
f . alstate = SMTPStateAlloc ( NULL , ALPROTO_UNKNOWN ) ;
MimeDecParseState * state = MimeDecInitParser ( & f , NULL ) ;
( ( MimeDecEntity * ) state - > stack - > top - > data ) - > ctnt_flags = CTNT_IS_ATTACHMENT ;
int ret = MIME_DEC_OK ;
@ -5281,7 +5281,7 @@ static int SMTPProcessDataChunkTest05(void){
int ret ;
FLOW_INITIALIZE ( & f ) ;
f . protoctx = & ssn ;
f . alstate = SMTPStateAlloc ( ) ;
f . alstate = SMTPStateAlloc ( NULL , ALPROTO_UNKNOWN ) ;
FAIL_IF ( f . alstate = = NULL ) ;
MimeDecParseState * state = MimeDecInitParser ( & f , NULL ) ;
( ( MimeDecEntity * ) state - > stack - > top - > data ) - > ctnt_flags = CTNT_IS_ATTACHMENT ;