diff options
author | Shaun Ruffell <sruffell@digium.com> | 2010-10-20 12:23:16 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2010-10-20 12:23:16 +0000 |
commit | feac553f9f107e630f79d2170178dd6715d1d3d2 (patch) | |
tree | c8202f29bd507acced85d75375d9569a9d54281f /drivers/dahdi/tor2.c | |
parent | adfd5587c10a27dc0e843392c843a246587af22f (diff) |
dahdi: Atomically set/test if channel has associated network device.
Push all tests for the DAHDI_FLAGBIT_NETDEV flag behind a
'dahdi_have_netdev' function so if CONFIG_DAHDI_NET is not defined the
compiler can just remove all the flag tests. Also, makes sure that the
bit is checked / set atomically.
(closes issue #9379)
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Kinsey Moore <kmoore@digium.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9444 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/tor2.c')
-rw-r--r-- | drivers/dahdi/tor2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dahdi/tor2.c b/drivers/dahdi/tor2.c index f30f9f7..93e0dbd 100644 --- a/drivers/dahdi/tor2.c +++ b/drivers/dahdi/tor2.c @@ -1397,7 +1397,7 @@ DAHDI_IRQ_HANDLER(tor2_intr) /* go thru all chans, and count # open */ for (n = 0, k = 0; k < tor->tspans[i].dahdi_span.channels; k++) { if (((tor->chans[i][k])->flags & DAHDI_FLAG_OPEN) || - ((tor->chans[i][k])->flags & DAHDI_FLAG_NETDEV)) + dahdi_have_netdev(tor->chans[i][k])) n++; } /* if none open, set alarm condition */ |