diff options
author | Jason Parker <jparker@digium.com> | 2008-08-25 15:57:19 +0000 |
---|---|---|
committer | Jason Parker <jparker@digium.com> | 2008-08-25 15:57:19 +0000 |
commit | f2734f6a7ce78609d43a3b7f3e3fba96809f0919 (patch) | |
tree | 38c6e6f5a4ae257b7f8582c7573fb694217b1b39 /dahdi_cfg.c | |
parent | 6c0aa6dd7e17243cb502a0fcdd68794fd71d6993 (diff) |
Reverse some incorrect logic, and cleanup some very ugly formatting in passing.
git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@4826 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'dahdi_cfg.c')
-rw-r--r-- | dahdi_cfg.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/dahdi_cfg.c b/dahdi_cfg.c index 4fd6c12..559c6cc 100644 --- a/dahdi_cfg.c +++ b/dahdi_cfg.c @@ -1299,10 +1299,12 @@ static void printconfig(int fd) } 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 @@ int main(int argc, char *argv[]) } finish: - if (!errcnt) { + if (errcnt) { fprintf(stderr, "\n%d error(s) detected\n\n", errcnt); exit(1); } @@ -1508,7 +1510,7 @@ finish: /* 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)); |