summaryrefslogtreecommitdiff
path: root/res/res_pjsip_caller_id.c
diff options
context:
space:
mode:
authorGeorge Joseph <gjoseph@digium.com>2016-08-11 10:24:34 -0600
committerGeorge Joseph <gjoseph@digium.com>2016-08-11 13:16:41 -0600
commit4d5e96ab53f7076496e62b251dd349f320120d88 (patch)
tree3b180ac77ed9ab997c02a703edbffe0f57da0c21 /res/res_pjsip_caller_id.c
parent134db75e67850513e26addf171b8be79e66ee03d (diff)
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
Diffstat (limited to 'res/res_pjsip_caller_id.c')
-rw-r--r--res/res_pjsip_caller_id.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_pjsip_caller_id.c b/res/res_pjsip_caller_id.c
index efa1b89a8..4d9f09237 100644
--- a/res/res_pjsip_caller_id.c
+++ b/res/res_pjsip_caller_id.c
@@ -413,7 +413,7 @@ static pjsip_fromto_hdr *create_new_id_hdr(const pj_str_t *hdr_name, pjsip_fromt
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);