summaryrefslogtreecommitdiff
path: root/dahdi_scan.c
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2009-11-04 16:36:21 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2009-11-04 16:36:21 +0000
commitdb77afdbde30d91a64707ef94627cf00938b2664 (patch)
treeda7d141c9bc61fe02fd410808cf571ce0a9a4b1b /dahdi_scan.c
parent746ff447145a44ea0a8898677be4227bb93a2834 (diff)
Compilation and documentation fixes from trunk
Merged revisions 6842,6898,6902,6976,7131 via svnmerge from http://svn.digium.com/svn/dahdi/tools/trunk ........ r6842 | tzafrir | 2009-07-16 13:19:23 +0300 (Thu, 16 Jul 2009) | 2 lines Document attributes of a Dahdi::Xpp::Xpd object. ........ r6898 | dbrooks | 2009-07-27 22:54:13 +0300 (Mon, 27 Jul 2009) | 6 lines Replaces typos "recieved" with "received" and "initilize" with "initialize". (closes issue #15571) Reported by: alecdavis ........ r6902 | seanbright | 2009-07-28 00:05:16 +0300 (Tue, 28 Jul 2009) | 11 lines Pass correct channel number to DAHDI_GET_PARAMS when passing span numbers to dahdi_scan. When filtering, we weren't taking into account the number of channels in the spans that we were skipping. (closes issue #15553) Reported by: tony Patches: 20090723_issue15553.patch uploaded by seanbright (license 71) Tested by: seanbright ........ r6976 | tzafrir | 2009-08-12 22:21:01 +0300 (Wed, 12 Aug 2009) | 4 lines xpp: cleanup gcc warnings and one real astribank_tool bug xpp rev: 7281 ........ r7131 | tzafrir | 2009-09-15 19:52:58 +0300 (Tue, 15 Sep 2009) | 7 lines Add a missing trailing slash on the install-libs target (closes issue #15793) Reported by: pprindeville Patches: dahdi-tools-makefile.patch uploaded by pprindeville (license 347) ........ git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/branches/2.2@7471 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'dahdi_scan.c')
-rw-r--r--dahdi_scan.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/dahdi_scan.c b/dahdi_scan.c
index f844b41..d1564f4 100644
--- a/dahdi_scan.c
+++ b/dahdi_scan.c
@@ -60,8 +60,14 @@ int main(int argc, char *argv[])
span_filter[filter_count++] = s;
}
}
-
+
for (x = 1; x < DAHDI_MAX_SPANS; x++) {
+
+ memset(&s, 0, sizeof(s));
+ s.spanno = x;
+ if (ioctl(ctl, DAHDI_SPANSTAT, &s))
+ continue;
+
if (filter_count > 0) {
int match = 0;
for (z = 0; z < filter_count; z++) {
@@ -71,13 +77,10 @@ int main(int argc, char *argv[])
}
}
if (!match) {
+ basechan += s.totalchans;
continue;
}
}
- memset(&s, 0, sizeof(s));
- s.spanno = x;
- if (ioctl(ctl, DAHDI_SPANSTAT, &s))
- continue;
alarms[0] = '\0';
if (s.alarms) {