]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
don't kill the call if tdd mode is not supported by a channel (bug #4370)
authorRussell Bryant <russell@russellbryant.com>
Tue, 14 Jun 2005 19:45:49 +0000 (19:45 +0000)
committerRussell Bryant <russell@russellbryant.com>
Tue, 14 Jun 2005 19:45:49 +0000 (19:45 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@5909 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_agi.c

index 4bcc610f2e76a495cc9566c035c2d8fbcbbb2e2c..05119c9c4375872be5f2304eb6e36f3eebb880b0 100755 (executable)
@@ -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[])