aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_iax2.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2011-07-06 04:52:35 +0200
committerPatrick McHardy <kaber@trash.net>2011-07-06 04:52:35 +0200
commit916e420bf0c8db7a8cb1f60557cd2807652142cf (patch)
treeece8aaf3f22e6e1cc545a858cad9e05c34713426 /channels/chan_iax2.c
parent9364aaccb699c6d19ac2cbe760c208b34ba7838a (diff)
parent357b97fb29d196a5f336d6a2879278ea135ab08c (diff)
Merge branch 'master' of 192.168.0.100:/repos/git/asterisk
Diffstat (limited to 'channels/chan_iax2.c')
-rw-r--r--channels/chan_iax2.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index 0802474ee..9f5f32deb 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -32,7 +32,7 @@
*/
/*** MODULEINFO
- <use>crypto</use>
+ <use type="external">crypto</use>
***/
#include "asterisk.h"
@@ -5363,10 +5363,6 @@ static int iax2_setoption(struct ast_channel *c, int option, void *data, int dat
/* these two cannot be sent, because they require a result */
errno = ENOSYS;
return -1;
- case AST_OPTION_FORMAT_READ:
- case AST_OPTION_FORMAT_WRITE:
- case AST_OPTION_MAKE_COMPATIBLE:
- return -1;
case AST_OPTION_OPRMODE:
errno = EINVAL;
return -1;
@@ -5383,7 +5379,16 @@ static int iax2_setoption(struct ast_channel *c, int option, void *data, int dat
ast_mutex_unlock(&iaxsl[callno]);
return 0;
}
- default:
+ /* These options are sent to the other side across the network where
+ * they will be passed to whatever channel is bridged there. Don't
+ * do anything silly like pass an option that transmits pointers to
+ * memory on this machine to a remote machine to use */
+ case AST_OPTION_TONE_VERIFY:
+ case AST_OPTION_TDD:
+ case AST_OPTION_RELAXDTMF:
+ case AST_OPTION_AUDIO_MODE:
+ case AST_OPTION_DIGIT_DETECT:
+ case AST_OPTION_FAX_DETECT:
{
unsigned short callno = PTR_TO_CALLNO(c->tech_pvt);
struct chan_iax2_pvt *pvt;
@@ -5411,7 +5416,12 @@ static int iax2_setoption(struct ast_channel *c, int option, void *data, int dat
ast_free(h);
return res;
}
+ default:
+ return -1;
}
+
+ /* Just in case someone does a break instead of a return */
+ return -1;
}
static int iax2_queryoption(struct ast_channel *c, int option, void *data, int *datalen)