[Asterisk-cvs] asterisk/apps app_agi.c,1.26,1.26.2.1

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


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

Modified Files:
      Tag: v1-0_stable
	app_agi.c 
Log Message:
Bail on AGI if return value from exec is AST_PBX_KEEPALIVE


Index: app_agi.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_agi.c,v
retrieving revision 1.26
retrieving revision 1.26.2.1
diff -u -d -r1.26 -r1.26.2.1
--- app_agi.c	30 Jan 2004 05:37:39 -0000	1.26
+++ app_agi.c	5 Mar 2004 14:24:10 -0000	1.26.2.1
@@ -1218,6 +1218,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 */
@@ -1285,7 +1289,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