[svn-commits] seanbright: tools/trunk r6902 - /tools/trunk/dahdi_scan.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Jul 27 16:05:21 CDT 2009


Author: seanbright
Date: Mon Jul 27 16:05:16 2009
New Revision: 6902

URL: http://svn.asterisk.org/svn-view/dahdi?view=rev&rev=6902
Log:
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

Modified:
    tools/trunk/dahdi_scan.c

Modified: tools/trunk/dahdi_scan.c
URL: http://svn.asterisk.org/svn-view/dahdi/tools/trunk/dahdi_scan.c?view=diff&rev=6902&r1=6901&r2=6902
==============================================================================
--- tools/trunk/dahdi_scan.c (original)
+++ tools/trunk/dahdi_scan.c Mon Jul 27 16:05:16 2009
@@ -60,8 +60,14 @@
 			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 @@
 				}
 			}
 			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) {




More information about the svn-commits mailing list