diff options
author | Kinsey Moore <kmoore@digium.com> | 2014-08-27 15:31:35 +0000 |
---|---|---|
committer | Kinsey Moore <kmoore@digium.com> | 2014-08-27 15:31:35 +0000 |
commit | a4a58c2771928ac6e2cd0ca1e1f41c28b901fa13 (patch) | |
tree | c018eecb1ac01938f91e701bdfff44215a09b9b3 /include/asterisk | |
parent | e985cb076d22a2434d016707e674afbc48957a4c (diff) |
CallerID: Fix parsing of malformed callerid
This allows the callerid parsing function to handle malformed input
strings and strings containing escaped and unescaped double quotes.
This also adds a unittest to cover many of the cases where the parsing
algorithm previously failed.
Review: https://reviewboard.asterisk.org/r/3923/
Review: https://reviewboard.asterisk.org/r/3933/
........
Merged revisions 422112 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 422113 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 422114 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@422154 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk')
-rw-r--r-- | include/asterisk/utils.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/asterisk/utils.h b/include/asterisk/utils.h index 47a438eb3..464ff1cdc 100644 --- a/include/asterisk/utils.h +++ b/include/asterisk/utils.h @@ -318,6 +318,15 @@ int ast_xml_escape(const char *string, char *outbuf, size_t buflen); */ char *ast_escape_quoted(const char *string, char *outbuf, int buflen); +/*! + * \brief Unescape quotes in a string + * + * \param quote_str The string with quotes to be unescaped + * + * \note This function mutates the passed-in string. + */ +void ast_unescape_quoted(char *quote_str); + static force_inline void ast_slinear_saturated_add(short *input, short *value) { int res; |