[asterisk-commits] res pjsip caller id: Copy header name to short header name (asterisk[master])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Aug 12 16:08:46 CDT 2016
Anonymous Coward #1000019 has submitted this change and it was merged.
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.
res_pjsip_diversion needed the same treatment for the Diversion header.
ASTERISK-26241 #close
Change-Id: I633ec139630cd83809aae00336cee4a10077e467
---
M res/res_pjsip_caller_id.c
M res/res_pjsip_diversion.c
2 files changed, 2 insertions(+), 2 deletions(-)
Approvals:
Richard Mudgett: Looks good to me, but someone else must approve
Anonymous Coward #1000019: Verified
Joshua Colp: Looks good to me, approved
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);
diff --git a/res/res_pjsip_diversion.c b/res/res_pjsip_diversion.c
index f1a6ddf..82c3caa 100644
--- a/res/res_pjsip_diversion.c
+++ b/res/res_pjsip_diversion.c
@@ -305,7 +305,7 @@
hdr = pjsip_from_hdr_create(tdata->pool);
hdr->type = PJSIP_H_OTHER;
pj_strdup(tdata->pool, &hdr->name, &diversion_name);
- hdr->sname.slen = 0;
+ hdr->sname = hdr->name;
name_addr = pjsip_uri_clone(tdata->pool, base);
uri = pjsip_uri_get_uri(name_addr->uri);
--
To view, visit https://gerrit.asterisk.org/3469
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I633ec139630cd83809aae00336cee4a10077e467
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
More information about the asterisk-commits
mailing list