aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_dahdi.c
diff options
context:
space:
mode:
authortzafrir <tzafrir@f38db490-d61c-443f-a65b-d21fe96a405b>2009-10-26 11:34:06 +0000
committertzafrir <tzafrir@f38db490-d61c-443f-a65b-d21fe96a405b>2009-10-26 11:34:06 +0000
commit53699afbb75f45fc5fb5db9cca7eac9d27432d6c (patch)
tree1e565bb34851df6301e6e4782b1dded166604fb5 /channels/chan_dahdi.c
parent7eaa3b83ad53f64d425bc84378c5e20febc778a9 (diff)
Re-arange code a bit to build in dev-mode without ss7
No change of functionality here. Just localized a variable and indented code into blocks. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@225803 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_dahdi.c')
-rw-r--r--channels/chan_dahdi.c27
1 files changed, 17 insertions, 10 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index 65c8e4159..ff48aea6b 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -4085,7 +4085,6 @@ static int update_conf(struct dahdi_pvt *p)
static void dahdi_enable_ec(struct dahdi_pvt *p)
{
- int x;
int res;
if (!p)
return;
@@ -4112,10 +4111,15 @@ static void dahdi_enable_ec(struct dahdi_pvt *p)
/* 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));
+ {
+ int 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:
@@ -4361,7 +4365,7 @@ static inline int dahdi_set_hook(int fd, int hs)
static inline int dahdi_confmute(struct dahdi_pvt *p, int muted)
{
- int x, y, res;
+ int x, res;
x = muted;
switch (p->sig) {
@@ -4375,10 +4379,13 @@ static inline int dahdi_confmute(struct dahdi_pvt *p, int muted)
/* 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));
+ {
+ int 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: