make AGI 'TDD MODE' command behave as documented when the channel doesn't support options (bug #4370)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5851 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
parent
8a0ade1fd8
commit
8ad230082e
|
@ -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[])
|
||||
|
|
Loading…
Reference in New Issue