Explorar o código

tm: safety check for uas callid value when callid_matching is 1

- according to the documentation is for UA that cannot match the
  responses when call-id is changed, but is not the case of self
  generated requests
- closes FS#390
Alex Hermann %!s(int64=11) %!d(string=hai) anos
pai
achega
1787b4239f
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      modules/tm/t_lookup.c

+ 1 - 0
modules/tm/t_lookup.c

@@ -984,6 +984,7 @@ int t_reply_matching( struct sip_msg *p_msg , int *p_branch )
 			continue;
 
 		if (cfg_get(tm, tm_cfg, callid_matching) && 
+				p_cell->uas.request && p_cell->uas.request->callid &&
 		        (p_msg->callid->body.len != p_cell->uas.request->callid->body.len ||
 		         memcmp(p_msg->callid->body.s, p_cell->uas.request->callid->body.s, p_msg->callid->body.len) != 0)
 		) {