[Asterisk-cvs] asterisk manager.c,1.37.2.3,1.37.2.4

citats at lists.digium.com citats at lists.digium.com
Tue Mar 9 15:09:50 CST 2004


Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv13364

Modified Files:
      Tag: v1-0_stable
	manager.c 
Log Message:
Verify the right vars are passed to manager originate (bug 1185)


Index: manager.c
===================================================================
RCS file: /usr/cvsroot/asterisk/manager.c,v
retrieving revision 1.37.2.3
retrieving revision 1.37.2.4
diff -u -d -r1.37.2.3 -r1.37.2.4
--- manager.c	2 Mar 2004 08:46:06 -0000	1.37.2.3
+++ manager.c	9 Mar 2004 20:02:22 -0000	1.37.2.4
@@ -522,7 +522,12 @@
 	if (strlen(app)) {
         	res = ast_pbx_outgoing_app(tech, AST_FORMAT_SLINEAR, data, to, app, appdata, &reason, 0, strlen(callerid) ? callerid : NULL, variable, account);
     	} else {
-        	res = ast_pbx_outgoing_exten(tech, AST_FORMAT_SLINEAR, data, to, context, exten, pi, &reason, 0, strlen(callerid) ? callerid : NULL, variable, account);
+		if (exten && context && pi)
+	        	res = ast_pbx_outgoing_exten(tech, AST_FORMAT_SLINEAR, data, to, context, exten, pi, &reason, 0, strlen(callerid) ? callerid : NULL, variable, account);
+		else {
+			astman_send_error(s, m, "Originate with 'Exten' requires 'Context' and 'Priority'");
+			return 0;
+		}
 	}   
 	if (!res)
 		astman_send_ack(s, m, "Originate successfully queued");




More information about the svn-commits mailing list