From: Russell Bryant Date: Tue, 14 Jun 2005 19:45:49 +0000 (+0000) Subject: don't kill the call if tdd mode is not supported by a channel (bug #4370) X-Git-Tag: 1.0.11.1~89 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02bb0b5e222cba964f07ec3ea27e26d236fa79da;p=thirdparty%2Fasterisk.git don't kill the call if tdd mode is not supported by a channel (bug #4370) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@5909 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/res/res_agi.c b/res/res_agi.c index 4bcc610f2e..05119c9c43 100755 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -396,11 +396,11 @@ static int handle_tddmode(struct ast_channel *chan, AGI *agi, int argc, char *ar if (!strncasecmp(argv[2],"mate",4)) x = 2; 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) + fprintf(agi->fd, "200 result=1\n"); else - return RESULT_FAILURE; + fprintf(agi->fd, "200 result=0\n"); + return RESULT_SUCCESS; } static int handle_sendimage(struct ast_channel *chan, AGI *agi, int argc, char *argv[])