@miconda commented on this pull request.
@@ -3715,6 +3721,29 @@ int pv_set_xto_attr(struct
sip_msg *msg, pv_param_t *param, int op,
}
buf.len = val->rs.len;
memcpy(buf.s, val->rs.s, val->rs.len);
+
+ /* Check if the URI is enclosed in angle brackets */
+ is_enclosed = is_uri_enclosed(msg, tb);
+ /* If uri is not enclosed, we need to enclose it in < >
+ before adding display name */
+ if(!is_enclosed) {
The function to discover if it is enclosed seems rather a simple condition, so maybe it is
better to replace the condition directly like:
```
if(tb->display.len == 0 && tb->body.s[0] != '<') {
```
And remove the function.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3935#pullrequestreview-2336729716
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3935/review/2336729716(a)github.com>