[Asterisk-cvs] asterisk manager.c,1.40,1.41

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


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

Modified Files:
	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.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- manager.c	2 Mar 2004 08:45:51 -0000	1.40
+++ manager.c	9 Mar 2004 20:01:46 -0000	1.41
@@ -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