[svn-commits] tzafrir: trunk r225767 - /trunk/channels/chan_dahdi.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Mon Oct 26 04:40:55 CDT 2009
Author: tzafrir
Date: Mon Oct 26 04:40:49 2009
New Revision: 225767
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=225767
Log:
Make chan_dahdi build even without PRI / SS7
(Note: still some strange build warnings without SS7 in dev-mode)
Modified:
trunk/channels/chan_dahdi.c
Modified: trunk/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_dahdi.c?view=diff&rev=225767&r1=225766&r2=225767
==============================================================================
--- trunk/channels/chan_dahdi.c (original)
+++ trunk/channels/chan_dahdi.c Mon Oct 26 04:40:49 2009
@@ -4099,6 +4099,7 @@
}
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 @@
*/
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 @@
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 @@
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 @@
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 @@
ast_channel_unlock(c1);
return AST_BRIDGE_FAILED_NOWARN;
}
+#endif
if ((oi0 == SUB_REAL) && (oi1 == SUB_REAL)) {
if (p0->owner && p1->owner) {
More information about the svn-commits
mailing list