[asterisk-commits] tilghman: branch 1.6.2 r187366 - in /branches/1.6.2: ./ apps/ channels/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Apr 9 11:41:35 CDT 2009


Author: tilghman
Date: Thu Apr  9 11:41:31 2009
New Revision: 187366

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

................
  r187363 | tilghman | 2009-04-09 11:39:43 -0500 (Thu, 09 Apr 2009) | 10 lines
  
  Merged revisions 187362 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r187362 | tilghman | 2009-04-09 11:38:37 -0500 (Thu, 09 Apr 2009) | 3 lines
    
    Permit zero-length text messages in SIP.
    (Related to an issue posted to the -users list, subject "AEL2, BASE64_DECODE and hexadecimal")
  ........
................

Modified:
    branches/1.6.2/   (props changed)
    branches/1.6.2/apps/app_sendtext.c
    branches/1.6.2/channels/chan_sip.c

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

Modified: branches/1.6.2/apps/app_sendtext.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.2/apps/app_sendtext.c?view=diff&rev=187366&r1=187365&r2=187366
==============================================================================
--- branches/1.6.2/apps/app_sendtext.c (original)
+++ branches/1.6.2/apps/app_sendtext.c Thu Apr  9 11:41:31 2009
@@ -81,7 +81,9 @@
 		AST_APP_ARG(text);
 	);
 
-	if (ast_strlen_zero(data)) {
+	/* NOT ast_strlen_zero, because some protocols (e.g. SIP) MUST be able to
+	 * send a zero-length message. */
+	if (!data) {
 		ast_log(LOG_WARNING, "SendText requires an argument (text)\n");
 		return -1;
 	} else

Modified: branches/1.6.2/channels/chan_sip.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.2/channels/chan_sip.c?view=diff&rev=187366&r1=187365&r2=187366
==============================================================================
--- branches/1.6.2/channels/chan_sip.c (original)
+++ branches/1.6.2/channels/chan_sip.c Thu Apr  9 11:41:31 2009
@@ -4117,7 +4117,9 @@
 		ast_verbose("Sending text %s on %s\n", text, ast->name);
 	if (!p)
 		return -1;
-	if (ast_strlen_zero(text))
+	/* NOT ast_strlen_zero, because a zero-length message is specifically
+	 * allowed by RFC 3428 (See section 10, Examples) */
+	if (!text)
 		return 0;
 	if (debug)
 		ast_verbose("Really sending text %s on %s\n", text, ast->name);




More information about the asterisk-commits mailing list