[Asterisk-cvs] asterisk/apps app_agi.c,1.28,1.29

markster at lists.digium.com markster at lists.digium.com
Fri Mar 5 09:32:01 CST 2004


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

Modified Files:
	app_agi.c 
Log Message:
Bail an AGI on PBX_KEEPALIVE being set in an exec.


Index: app_agi.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_agi.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- app_agi.c	3 Mar 2004 18:58:57 -0000	1.28
+++ app_agi.c	5 Mar 2004 14:23:22 -0000	1.29
@@ -1248,6 +1248,10 @@
 			fdprintf(agi->fd, c->usage);
 			fdprintf(agi->fd, "520 End of proper usage.\n");
 			break;
+		case AST_PBX_KEEPALIVE:
+			/* We've been asked to keep alive, so do so */
+			return AST_PBX_KEEPALIVE;
+			break;
 		case RESULT_FAILURE:
 			/* They've already given the failure.  We've been hung up on so handle this
 			   appropriately */
@@ -1316,7 +1320,7 @@
 
 			returnstatus |= agi_handle_command(chan, agi, buf);
 			/* If the handle_command returns -1, we need to stop */
-			if (returnstatus < 0) {
+			if ((returnstatus < 0) || (returnstatus == AST_PBX_KEEPALIVE)) {
 				break;
 			}
 		} else {




More information about the svn-commits mailing list