summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2010-08-13 18:40:00 +0000
committerShaun Ruffell <sruffell@digium.com>2010-08-13 18:40:00 +0000
commitc99319d78689c2303773bb60a3dc2fb4bad9b2d7 (patch)
tree728b5735d004ba03db24663ed9c091d5fefdaf0a
parentc942a91a4c137ec8d4e998fb86b573a9700cb810 (diff)
dahdi_scan: Use 'linecompat' to identify digital spans.
This fixes the case where the BRI spans on the Hx8 cards were displayed as analog spans. git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@9133 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r--dahdi_scan.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/dahdi_scan.c b/dahdi_scan.c
index 26ec781..582f44d 100644
--- a/dahdi_scan.c
+++ b/dahdi_scan.c
@@ -37,6 +37,11 @@
#include "dahdi_tools_version.h"
+static inline int is_digital_span(struct dahdi_spaninfo *s)
+{
+ return (s->linecompat > 0);
+}
+
int main(int argc, char *argv[])
{
int ctl;
@@ -135,7 +140,7 @@ int main(int argc, char *argv[])
continue;
}
- if (params.sigcap & (__DAHDI_SIG_DACS | DAHDI_SIG_CAS)) {
+ if (is_digital_span(&s)) {
/* this is a digital span */
fprintf(stdout, "type=digital-%s\n", s.spantype);
fprintf(stdout, "syncsrc=%d\n", s.syncsrc);