[asterisk-commits] tilghman: branch 1.6.0 r207947 - in /branches/1.6.0: ./ funcs/func_strings.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jul 21 17:47:35 CDT 2009


Author: tilghman
Date: Tue Jul 21 17:47:31 2009
New Revision: 207947

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=207947
Log:
Merged revisions 207946 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r207946 | tilghman | 2009-07-21 17:45:32 -0500 (Tue, 21 Jul 2009) | 15 lines
  
  Merged revisions 207945 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r207945 | tilghman | 2009-07-21 17:38:54 -0500 (Tue, 21 Jul 2009) | 8 lines
    
    Force an error if a blank is passed to QUOTE (because the documentation states the argument is not optional).
    This change makes URIENCODE and QUOTE behave similarly, since the documentation
    states that the argument is not optional, for both.
    (closes issue #15439)
     Reported by: pkempgen
     Patches: 
           20090706__issue15439.diff.txt uploaded by tilghman (license 14)
  ........
................

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/funcs/func_strings.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.0/funcs/func_strings.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.0/funcs/func_strings.c?view=diff&rev=207947&r1=207946&r2=207947
==============================================================================
--- branches/1.6.0/funcs/func_strings.c (original)
+++ branches/1.6.0/funcs/func_strings.c Tue Jul 21 17:47:31 2009
@@ -580,6 +580,12 @@
 static int quote(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
 {
 	char *bufptr = buf, *dataptr = data;
+	if (ast_strlen_zero(data)) {
+		ast_log(LOG_WARNING, "No argument specified!\n");
+		ast_copy_string(buf, "\"\"", len);
+		return 0;
+	}
+
 	*bufptr++ = '"';
 	for (; bufptr < buf + len - 1; dataptr++) {
 		if (*dataptr == '\\') {




More information about the asterisk-commits mailing list