[asterisk-commits] dlee: branch 11 r379020 - in /branches/11: ./ channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Jan 14 09:27:23 CST 2013
Author: dlee
Date: Mon Jan 14 09:27:19 2013
New Revision: 379020
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=379020
Log:
Fix XML encoding of 'identity display' in NOTIFY messages, continued.
When r378933 was merged into 1.8, it should have also escaped
remote_display, since it will have the same XML encoding problem when
the caller/callee roles are reversed.
(closes issue ABE-2902)
Reported by: Guenther Kelleter
........
Merged revisions 379001 from http://svn.asterisk.org/svn/asterisk/branches/1.8
Modified:
branches/11/ (props changed)
branches/11/channels/chan_sip.c
Propchange: branches/11/
------------------------------------------------------------------------------
--- branch-1.8-merged (original)
+++ branch-1.8-merged Mon Jan 14 09:27:19 2013
@@ -1,1 +1,1 @@
-/branches/1.8:1-378147,378164,378356,378375,378427,378455-378456,378486,378514,378554,378591,378733,378776,378933,378967
+/branches/1.8:1-378147,378164,378356,378375,378427,378455-378456,378486,378514,378554,378591,378733,378776,378933,378967,379001
Modified: branches/11/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/channels/chan_sip.c?view=diff&rev=379020&r1=379019&r2=379020
==============================================================================
--- branches/11/channels/chan_sip.c (original)
+++ branches/11/channels/chan_sip.c Mon Jan 14 09:27:19 2013
@@ -14454,8 +14454,8 @@
if (data->state > 0 && (data->state & AST_EXTENSION_RINGING) && sip_cfg.notifyringing) {
/* Twice the extension length should be enough for XML encoding */
char local_display[AST_MAX_EXTENSION * 2];
+ char remote_display[AST_MAX_EXTENSION * 2];
char *local_target = ast_strdupa(mto);
- const char *remote_display = exten;
/* It may seem odd to base the remote_target on the To header here,
* but testing by reporters on issue ASTERISK-16735 found that basing
* on the From header would cause ringing state hints to not work
@@ -14467,6 +14467,7 @@
char *remote_target = ast_strdupa(mto);
ast_xml_escape(exten, local_display, sizeof(local_display));
+ ast_xml_escape(exten, remote_display, sizeof(remote_display));
/* There are some limitations to how this works. The primary one is that the
callee must be dialing the same extension that is being monitored. Simply dialing
@@ -14497,8 +14498,9 @@
remote_target = ast_alloca(need);
snprintf(remote_target, need, "sip:%s@%s", connected_num, p->fromdomain);
- remote_display = ast_strdupa(S_COR(ast_channel_connected(callee)->id.name.valid,
- ast_channel_connected(callee)->id.name.str, ""));
+ ast_xml_escape(S_COR(ast_channel_connected(callee)->id.name.valid,
+ ast_channel_connected(callee)->id.name.str, ""),
+ remote_display, sizeof(remote_display));
ast_channel_unlock(callee);
callee = ast_channel_unref(callee);
More information about the asterisk-commits
mailing list