[asterisk-commits] mmichelson: branch 1.6.1 r139565 - in /branches/1.6.1: ./ channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Aug 22 15:21:50 CDT 2008


Author: mmichelson
Date: Fri Aug 22 15:21:49 2008
New Revision: 139565

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

........
r139563 | mmichelson | 2008-08-22 15:20:58 -0500 (Fri, 22 Aug 2008) | 15 lines

The -1 return value from incomplete or improper
headers for the SipNotify manager command was
causing the current manager session to become
disconnected. Change the return value to 0 for
these cases.

Also change a test for a NULL pointer to be
ast_strlen_zero instead.

(closes issue #13351)
Reported by: Laureano
Patches:
      sipnotify_action_fix.patch uploaded by Laureano (license 265)


........

Modified:
    branches/1.6.1/   (props changed)
    branches/1.6.1/channels/chan_sip.c

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

Modified: branches/1.6.1/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/channels/chan_sip.c?view=diff&rev=139565&r1=139564&r2=139565
==============================================================================
--- branches/1.6.1/channels/chan_sip.c (original)
+++ branches/1.6.1/channels/chan_sip.c Fri Aug 22 15:21:49 2008
@@ -9470,9 +9470,9 @@
 	struct ast_variable *vars = astman_get_variables(m);
 	struct sip_pvt *p;
 
-	if (!channame) {
+	if (ast_strlen_zero(channame)) {
 		astman_send_error(s, m, "SIPNotify requires a channel name");
-		return -1;
+		return 0;
 	}
 
 	if (!strncasecmp(channame, "sip/", 4)) {
@@ -9481,7 +9481,7 @@
 
 	if (!(p = sip_alloc(NULL, NULL, 0, SIP_NOTIFY))) {
 		astman_send_error(s, m, "Unable to build sip pvt data for notify (memory/socket error)");
-		return -1;
+		return 0;
 	}
 
 	if (create_addr(p, channame, NULL, 0)) {
@@ -9490,7 +9490,7 @@
 		dialog_unref(p, "unref dialog inside for loop" );
 		/* sip_destroy(p); */
 		astman_send_error(s, m, "Could not create address");
-		return -1;
+		return 0;
 	}
 
 	/* Notify is outgoing call */




More information about the asterisk-commits mailing list