소스 검색

- fixed bug in nameaddr.uri: <sip:abc@123>;param is equal to sip:abc@123;param, i.e. remove params from uri when no <

Tomas Mandys 19 년 전
부모
커밋
ca807b0bdc
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      select_core.c

+ 4 - 1
select_core.c

@@ -968,7 +968,10 @@ int select_nameaddr_uri(str* res, select_t* s, struct sip_msg* msg)
 	
 	p=find_not_quoted(res, '<');
 	if (!p) {
-		DBG("select_nameaddr_uri: no < found, whole string is uri\n");
+		DBG("select_nameaddr_uri: no < found, string up to first semicolon is uri\n");
+		p = q_memchr(res->s, ';', res->len);
+		if (p)
+			res->len = p-res->s;
 		return 0;
 	}