Browse Source

- 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 năm trước cách đây
mục cha
commit
ca807b0bdc
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  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;
 	}