소스 검색

*** empty log message ***

Bogdan-Andrei Iancu 24 년 전
부모
커밋
eb48bf355f
1개의 변경된 파일8개의 추가작업 그리고 4개의 파일을 삭제
  1. 8 4
      modules/tm/t_funcs.c

+ 8 - 4
modules/tm/t_funcs.c

@@ -161,10 +161,14 @@ int t_lookup_request( struct sip_msg* p_msg, char* foo, char* bar  )
                if ( /*callid length*/ p_cell->inbound_request->callid->body.len == p_msg->callid->body.len )
                if ( /*callid length*/ p_cell->inbound_request->callid->body.len == p_msg->callid->body.len )
                   if ( /*cseq length*/ p_cell->inbound_request->cseq->body.len == p_msg->cseq->body.len )
                   if ( /*cseq length*/ p_cell->inbound_request->cseq->body.len == p_msg->cseq->body.len )
                      /* so far the lengths are the same -> let's check the contents */
                      /* so far the lengths are the same -> let's check the contents */
-                        if ( /*from*/ !memcmp( p_cell->inbound_request->from->body.s , p_msg->from->body.s , p_msg->from->body.len ) )
-                           if ( /*to*/ !memcmp( p_cell->inbound_request->to->body.s , p_msg->to->body.s , p_msg->to->body.len)  )
-                               if ( /*callid*/ !memcmp( p_cell->inbound_request->callid->body.s , p_msg->callid->body.s , p_msg->callid->body.len ) )
-                                  if ( /*cseq*/ !memcmp( p_cell->inbound_request->cseq->body.s , p_msg->cseq->body.s , p_msg->cseq->body.len ) )
+                        if ( /*from*/ !p_cell->inbound_request->from->body.s || !p_msg->from->body.s ||
+                           !memcmp( p_cell->inbound_request->from->body.s , p_msg->from->body.s , p_msg->from->body.len ) )
+                           if ( /*to*/ !p_cell->inbound_request->callid->body.s || !p_msg->callid->body.s   ||
+                               !memcmp( p_cell->inbound_request->to->body.s , p_msg->to->body.s , p_msg->to->body.len)  )
+                               if ( /*callid*/  !p_cell->inbound_request->callid->body.s || !p_msg->callid->body.s ||
+                                  !memcmp( p_cell->inbound_request->callid->body.s , p_msg->callid->body.s , p_msg->callid->body.len ) )
+                                  if ( /*cseq*/  !p_cell->inbound_request->cseq->body.s || !p_msg->cseq->body.s  ||
+                                     !memcmp( p_cell->inbound_request->cseq->body.s , p_msg->cseq->body.s , p_msg->cseq->body.len ) )
                                      { /* WE FOUND THE GOLDEN EGG !!!! */
                                      { /* WE FOUND THE GOLDEN EGG !!!! */
                                         DBG("DEBUG: t_lookup_request: non-ACK found\n");
                                         DBG("DEBUG: t_lookup_request: non-ACK found\n");
                                         T = p_cell;
                                         T = p_cell;