From d36cecd578a9c68e0b68f38a61994aa31595c38c Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Mon, 26 Oct 2009 09:40:49 +0000 Subject: Make chan_dahdi build even without PRI / SS7 (Note: still some strange build warnings without SS7 in dev-mode) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@225767 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_dahdi.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'channels') diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index a06665378..65c8e4159 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -4099,6 +4099,7 @@ static void dahdi_enable_ec(struct dahdi_pvt *p) } if (p->echocancel.head.tap_length) { switch (p->sig) { +#ifdef HAVE_PRI case SIG_PRI_LIB_HANDLE_CASES: if (((struct sig_pri_chan *) p->sig_pvt)->no_b_channel) { /* @@ -4107,12 +4108,15 @@ static void dahdi_enable_ec(struct dahdi_pvt *p) */ return; } +#endif /* Fall through */ +#ifdef HAVE_SS7 case SIG_SS7: x = 1; res = ioctl(p->subs[SUB_REAL].dfd, DAHDI_AUDIOMODE, &x); if (res) ast_log(LOG_WARNING, "Unable to enable audio mode on channel %d (%s)\n", p->channel, strerror(errno)); +#endif break; default: break; @@ -4361,17 +4365,21 @@ static inline int dahdi_confmute(struct dahdi_pvt *p, int muted) x = muted; switch (p->sig) { +#ifdef HAVE_PRI case SIG_PRI_LIB_HANDLE_CASES: if (((struct sig_pri_chan *) p->sig_pvt)->no_b_channel) { /* PRI nobch pseudo channel. Does not handle ioctl(DAHDI_AUDIOMODE) */ break; } +#endif /* Fall through */ +#ifdef HAVE_SS7 case SIG_SS7: y = 1; res = ioctl(p->subs[SUB_REAL].dfd, DAHDI_AUDIOMODE, &y); if (res) ast_log(LOG_WARNING, "Unable to set audio mode on %d: %s\n", p->channel, strerror(errno)); +#endif break; default: break; @@ -6025,11 +6033,13 @@ static int dahdi_setoption(struct ast_channel *chan, int option, void *data, int ast_dsp_set_digitmode(p->dsp, ((*cp) ? DSP_DIGITMODE_RELAXDTMF : DSP_DIGITMODE_DTMF) | p->dtmfrelax); break; case AST_OPTION_AUDIO_MODE: /* Set AUDIO mode (or not) */ +#ifdef HAVE_PRI if (dahdi_sig_pri_lib_handles(p->sig) && ((struct sig_pri_chan *) p->sig_pvt)->no_b_channel) { /* PRI nobch pseudo channel. Does not handle ioctl(DAHDI_AUDIOMODE) */ break; } +#endif cp = (char *) data; if (!*cp) { @@ -6409,6 +6419,7 @@ static enum ast_bridge_result dahdi_bridge(struct ast_channel *c0, struct ast_ch return AST_BRIDGE_RETRY; } +#ifdef HAVE_PRI if ((dahdi_sig_pri_lib_handles(p0->sig) && ((struct sig_pri_chan *) p0->sig_pvt)->no_b_channel) || (dahdi_sig_pri_lib_handles(p1->sig) @@ -6423,6 +6434,7 @@ static enum ast_bridge_result dahdi_bridge(struct ast_channel *c0, struct ast_ch ast_channel_unlock(c1); return AST_BRIDGE_FAILED_NOWARN; } +#endif if ((oi0 == SUB_REAL) && (oi1 == SUB_REAL)) { if (p0->owner && p1->owner) { -- cgit v1.2.3