[asterisk-commits] rizzo: branch rizzo/astobj2 r47557 -
/team/rizzo/astobj2/channels/chan_sip.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Mon Nov 13 10:36:35 MST 2006
Author: rizzo
Date: Mon Nov 13 11:36:34 2006
New Revision: 47557
URL: http://svn.digium.com/view/asterisk?view=rev&rev=47557
Log:
fix a bug reported in http://bugs.digium.com/view.php?id=7450
where a calleridname starting with a '<' is parsed
incorrectly.
trunk and 1.4 candidate
Modified:
team/rizzo/astobj2/channels/chan_sip.c
Modified: team/rizzo/astobj2/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/astobj2/channels/chan_sip.c?view=diff&rev=47557&r1=47556&r2=47557
==============================================================================
--- team/rizzo/astobj2/channels/chan_sip.c (original)
+++ team/rizzo/astobj2/channels/chan_sip.c Mon Nov 13 11:36:34 2006
@@ -9074,11 +9074,12 @@
if (!end || end == input) /* we require a part in brackets */
return NULL;
- /* move away from "<" */
- end--;
-
- /* we found "name" */
- if (tmp && tmp < end) {
+ end--; /* move just before "<" */
+
+ if (tmp && tmp <= end) {
+ /* The quote (tmp) precedes the bracket (end+1).
+ * Find the matching quote and return the content.
+ */
end = strchr(tmp+1, '"');
if (!end)
return NULL;
@@ -9088,7 +9089,7 @@
bytes = maxbytes;
ast_copy_string(output, tmp + 1, bytes);
} else {
- /* we didn't find "name" */
+ /* No quoted string, or it is inside brackets. */
/* clear the empty characters in the begining*/
input = ast_skip_blanks(input);
/* clear the empty characters in the end */
More information about the asterisk-commits
mailing list