[Asterisk-cvs] asterisk/res res_agi.c,1.35,1.36

kpfleming at lists.digium.com kpfleming at lists.digium.com
Sun Jun 5 16:58:03 CDT 2005


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

Modified Files:
	res_agi.c 
Log Message:
make AGI 'TDD MODE' command behave as documented when the channel doesn't support options (bug #4370)


Index: res_agi.c
===================================================================
RCS file: /usr/cvsroot/asterisk/res/res_agi.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- res_agi.c	19 May 2005 02:57:45 -0000	1.35
+++ res_agi.c	5 Jun 2005 21:00:33 -0000	1.36
@@ -414,11 +414,11 @@
 	if (!strncasecmp(argv[2],"tdd",3))
 		x = 1;
 	res = ast_channel_setoption(chan, AST_OPTION_TDD, &x, sizeof(char), 0);
-	fdprintf(agi->fd, "200 result=%d\n", res);
-	if (res >= 0) 
-		return RESULT_SUCCESS;
+	if(res != RESULT_SUCCESS)
+		fdprintf(agi->fd, "200 result=0\n");
 	else
-		return RESULT_FAILURE;
+		fdprintf(agi->fd, "200 result=1\n");
+	return RESULT_SUCCESS;
 }
 
 static int handle_sendimage(struct ast_channel *chan, AGI *agi, int argc, char *argv[])




More information about the svn-commits mailing list