[asterisk-commits] file: trunk r419751 - in /trunk: ./ res/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jul 29 04:57:35 CDT 2014
Author: file
Date: Tue Jul 29 04:54:24 2014
New Revision: 419751
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=419751
Log:
res_pjsip_pidf_body_generator / res_pjsip_xpidf_body_generator: Ensure local entity is unquoted.
The local entity as provided by PJSIP is quoted within '<' and '>'. As a result placing
this value into XML will result in malformed XML being produced. This patch now unquotes
the local entity so it can go safely into the XML.
Review: https://reviewboard.asterisk.org/r/3851/
........
Merged revisions 419750 from http://svn.asterisk.org/svn/asterisk/branches/12
Modified:
trunk/ (props changed)
trunk/res/res_pjsip_pidf_body_generator.c
trunk/res/res_pjsip_xpidf_body_generator.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.
Modified: trunk/res/res_pjsip_pidf_body_generator.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_pjsip_pidf_body_generator.c?view=diff&rev=419751&r1=419750&r2=419751
==============================================================================
--- trunk/res/res_pjsip_pidf_body_generator.c (original)
+++ trunk/res/res_pjsip_pidf_body_generator.c Tue Jul 29 04:54:24 2014
@@ -38,10 +38,11 @@
static void *pidf_allocate_body(void *data)
{
struct ast_sip_exten_state_data *state_data = data;
+ char *local = ast_strdupa(state_data->local);
pjpidf_pres *pres;
pj_str_t entity;
- pres = pjpidf_create(state_data->pool, pj_cstr(&entity, state_data->local));
+ pres = pjpidf_create(state_data->pool, pj_cstr(&entity, ast_strip_quoted(local, "<", ">")));
return pres;
}
Modified: trunk/res/res_pjsip_xpidf_body_generator.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_pjsip_xpidf_body_generator.c?view=diff&rev=419751&r1=419750&r2=419751
==============================================================================
--- trunk/res/res_pjsip_xpidf_body_generator.c (original)
+++ trunk/res/res_pjsip_xpidf_body_generator.c Tue Jul 29 04:54:24 2014
@@ -39,10 +39,11 @@
static void *xpidf_allocate_body(void *data)
{
struct ast_sip_exten_state_data *state_data = data;
+ char *local = ast_strdupa(state_data->local);
pjxpidf_pres *pres;
pj_str_t name;
- pres = pjxpidf_create(state_data->pool, pj_cstr(&name, state_data->local));
+ pres = pjxpidf_create(state_data->pool, pj_cstr(&name, ast_strip_quoted(local, "<", ">")));
return pres;
}
More information about the asterisk-commits
mailing list