| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -46,34 +46,17 @@ static int StreamTcpTest01(void)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    memset(&f, 0, sizeof(Flow));
 | 
					 | 
					 | 
					 | 
					    memset(&f, 0, sizeof(Flow));
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    FLOW_INITIALIZE(&f);
 | 
					 | 
					 | 
					 | 
					    FLOW_INITIALIZE(&f);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    p->flow = &f;
 | 
					 | 
					 | 
					 | 
					    p->flow = &f;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    int ret = 0;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    StreamTcpUTInit(&stt.ra_ctx);
 | 
					 | 
					 | 
					 | 
					    StreamTcpUTInit(&stt.ra_ctx);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    TcpSession *ssn = StreamTcpNewSession(p, 0);
 | 
					 | 
					 | 
					 | 
					    TcpSession *ssn = StreamTcpNewSession(p, 0);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    if (ssn == NULL) {
 | 
					 | 
					 | 
					 | 
					    FAIL_IF_NULL(ssn);
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        printf("Session can not be allocated: ");
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        goto end;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    }
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    f.protoctx = ssn;
 | 
					 | 
					 | 
					 | 
					    f.protoctx = ssn;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					    FAIL_IF_NOT_NULL(f.alparser);
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    if (f.alparser != NULL) {
 | 
					 | 
					 | 
					 | 
					    FAIL_IF_NOT(ssn->state == 0);
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        printf("AppLayer field not set to NULL: ");
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        goto end;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    }
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    if (ssn->state != 0) {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        printf("TCP state field not set to 0: ");
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        goto end;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    }
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    StreamTcpSessionClear(p->flow->protoctx);
 | 
					 | 
					 | 
					 | 
					    StreamTcpSessionClear(p->flow->protoctx);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    ret = 1;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					end:
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    SCFree(p);
 | 
					 | 
					 | 
					 | 
					    SCFree(p);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    FLOW_DESTROY(&f);
 | 
					 | 
					 | 
					 | 
					    FLOW_DESTROY(&f);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    StreamTcpUTDeinit(stt.ra_ctx);
 | 
					 | 
					 | 
					 | 
					    StreamTcpUTDeinit(stt.ra_ctx);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    return ret;
 | 
					 | 
					 | 
					 | 
					    PASS;
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					/**
 | 
					 | 
					 | 
					 | 
					/**
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
 
 |