[svn-commits] tilghman: branch 1.4 r130959 - in /branches/1.4: channels/ main/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Jul 15 12:19:14 CDT 2008


Author: tilghman
Date: Tue Jul 15 12:19:13 2008
New Revision: 130959

URL: http://svn.digium.com/view/asterisk?view=rev&rev=130959
Log:
astman_send_error does not need a newline appended -- the API takes care of
that for us.
(closes issue #13068)
 Reported by: gknispel_proformatique
 Patches: 
       asterisk_1_4_astman_send.patch uploaded by gknispel (license 261)
       asterisk_trunk_astman_send.patch uploaded by gknispel (license 261)

Modified:
    branches/1.4/channels/chan_sip.c
    branches/1.4/main/manager.c

Modified: branches/1.4/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=130959&r1=130958&r2=130959
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Tue Jul 15 12:19:13 2008
@@ -10420,7 +10420,7 @@
 
 	peer = astman_get_header(m,"Peer");
 	if (ast_strlen_zero(peer)) {
-		astman_send_error(s, m, "Peer: <name> missing.\n");
+		astman_send_error(s, m, "Peer: <name> missing.");
 		return 0;
 	}
 	a[0] = "sip";
@@ -10469,7 +10469,7 @@
 			if (!ast_strlen_zero(id))
 				astman_append(s, "ActionID: %s\r\n",id);
 		} else {
-			snprintf (cbuf, sizeof(cbuf), "Peer %s not found.\n", argv[3]);
+			snprintf (cbuf, sizeof(cbuf), "Peer %s not found.", argv[3]);
 			astman_send_error(s, m, cbuf);
 			return 0;
 		}

Modified: branches/1.4/main/manager.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/manager.c?view=diff&rev=130959&r1=130958&r2=130959
==============================================================================
--- branches/1.4/main/manager.c (original)
+++ branches/1.4/main/manager.c Tue Jul 15 12:19:13 2008
@@ -1637,7 +1637,7 @@
 	}
 	if (!ast_strlen_zero(priority) && (sscanf(priority, "%d", &pi) != 1)) {
 		if ((pi = ast_findlabel_extension(NULL, context, exten, priority, NULL)) < 1) {
-			astman_send_error(s, m, "Invalid priority\n");
+			astman_send_error(s, m, "Invalid priority");
 			return 0;
 		}
 	}
@@ -1650,14 +1650,14 @@
 		return 0;
 	}
 	if (ast_check_hangup(chan)) {
-		astman_send_error(s, m, "Redirect failed, channel not up.\n");
+		astman_send_error(s, m, "Redirect failed, channel not up.");
 		ast_channel_unlock(chan);
 		return 0;
 	}
 	if (!ast_strlen_zero(name2))
 		chan2 = ast_get_channel_by_name_locked(name2);
 	if (chan2 && ast_check_hangup(chan2)) {
-		astman_send_error(s, m, "Redirect failed, extra channel not up.\n");
+		astman_send_error(s, m, "Redirect failed, extra channel not up.");
 		ast_channel_unlock(chan);
 		ast_channel_unlock(chan2);
 		return 0;
@@ -1869,19 +1869,19 @@
 	}
 	if (!ast_strlen_zero(priority) && (sscanf(priority, "%d", &pi) != 1)) {
 		if ((pi = ast_findlabel_extension(NULL, context, exten, priority, NULL)) < 1) {
-			astman_send_error(s, m, "Invalid priority\n");
+			astman_send_error(s, m, "Invalid priority");
 			return 0;
 		}
 	}
 	if (!ast_strlen_zero(timeout) && (sscanf(timeout, "%d", &to) != 1)) {
-		astman_send_error(s, m, "Invalid timeout\n");
+		astman_send_error(s, m, "Invalid timeout");
 		return 0;
 	}
 	ast_copy_string(tmp, name, sizeof(tmp));
 	tech = tmp;
 	data = strchr(tmp, '/');
 	if (!data) {
-		astman_send_error(s, m, "Invalid channel\n");
+		astman_send_error(s, m, "Invalid channel");
 		return 0;
 	}
 	*data++ = '\0';




More information about the svn-commits mailing list