[Asterisk-code-review] res pjsip caller id: Copy header name to short header name (asterisk[14])
George Joseph
asteriskteam at digium.com
Thu Aug 11 11:45:10 CDT 2016
George Joseph has uploaded a new change for review.
https://gerrit.asterisk.org/3468
Change subject: res_pjsip_caller_id: Copy header name to short header name
......................................................................
res_pjsip_caller_id: Copy header name to short header name
When compact_headers was set, we were sending a zero-length header name
for PAI and RPID because we always forced the short header name length
to 0. We did this because we cloned the header from "From" and wanted
to clear "f" from the sname. By cloning however, we bypass pjproject's
automatic logic that sets sname to name if there's no compact form of
the header, which there isn't for PAI and RPID. So now we force sname
to be the same as name right after we set name.
ASTERISK-26241 #close
Change-Id: I633ec139630cd83809aae00336cee4a10077e467
---
M res/res_pjsip_caller_id.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/68/3468/1
diff --git a/res/res_pjsip_caller_id.c b/res/res_pjsip_caller_id.c
index 283ec94..429cb61 100644
--- a/res/res_pjsip_caller_id.c
+++ b/res/res_pjsip_caller_id.c
@@ -413,7 +413,7 @@
id_hdr = pjsip_from_hdr_create(tdata->pool);
id_hdr->type = PJSIP_H_OTHER;
pj_strdup(tdata->pool, &id_hdr->name, hdr_name);
- id_hdr->sname.slen = 0;
+ id_hdr->sname = id_hdr->name;
id_name_addr = pjsip_uri_clone(tdata->pool, base->uri);
id_uri = pjsip_uri_get_uri(id_name_addr->uri);
--
To view, visit https://gerrit.asterisk.org/3468
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I633ec139630cd83809aae00336cee4a10077e467
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-Owner: George Joseph <gjoseph at digium.com>
More information about the asterisk-code-review
mailing list