aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_agi.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-06-05 21:00:33 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-06-05 21:00:33 +0000
commitb7997fe7bd563243b2aa7074ed66fce7c08bc0c0 (patch)
tree62cf0d2d449d3ff8f22c637b97c42988f8564997 /res/res_agi.c
parentdcd6e95d0a8915916fa0d8a60ba782a81034a010 (diff)
make AGI 'TDD MODE' command behave as documented when the channel doesn't support options (bug #4370)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5851 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_agi.c')
-rwxr-xr-xres/res_agi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/res/res_agi.c b/res/res_agi.c
index 7f58d6593..da2889816 100755
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -414,11 +414,11 @@ static int handle_tddmode(struct ast_channel *chan, AGI *agi, int argc, char *ar
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[])