[dahdi-commits] qwell: tools/trunk r4826 - /tools/trunk/dahdi_cfg.c
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Mon Aug 25 10:57:20 CDT 2008
Author: qwell
Date: Mon Aug 25 10:57:19 2008
New Revision: 4826
URL: http://svn.digium.com/view/dahdi?view=rev&rev=4826
Log:
Reverse some incorrect logic, and cleanup some very ugly formatting in passing.
Modified:
tools/trunk/dahdi_cfg.c
Modified: tools/trunk/dahdi_cfg.c
URL: http://svn.digium.com/view/dahdi/tools/trunk/dahdi_cfg.c?view=diff&rev=4826&r1=4825&r2=4826
==============================================================================
--- tools/trunk/dahdi_cfg.c (original)
+++ tools/trunk/dahdi_cfg.c Mon Aug 25 10:57:19 2008
@@ -1299,10 +1299,12 @@
} else
if (cc[x].sigtype) configs++;
}
- } else
- for (x=1;x<DAHDI_MAX_CHANNELS;x++)
+ } else {
+ for (x=1;x<DAHDI_MAX_CHANNELS;x++) {
if (cc[x].sigtype)
configs++;
+ }
+ }
printf("\n%d channels to configure.\n\n", configs);
}
@@ -1489,7 +1491,7 @@
}
finish:
- if (!errcnt) {
+ if (errcnt) {
fprintf(stderr, "\n%d error(s) detected\n\n", errcnt);
exit(1);
}
@@ -1508,7 +1510,7 @@
/* destroy them all */
ioctl(fd, DAHDI_DYNAMIC_DESTROY, &zds[x]);
}
- if (!stopmode) {
+ if (stopmode) {
for (x=0;x<spans;x++) {
if (ioctl(fd, DAHDI_SHUTDOWN, &lc[x].span)) {
fprintf(stderr, "DAHDI shutdown failed: %s\n", strerror(errno));
More information about the dahdi-commits
mailing list