xpp: waitfor_xpds: documentation
[dahdi/tools.git] / dahdi_cfg.c
index 90bd466..30add83 100644 (file)
@@ -109,7 +109,7 @@ static int fiftysixkhdlc[DAHDI_MAX_CHANNELS];
 
 static int spans=0;
 
-static int fo_real = 1;
+static int dry_run = 0;
 
 static int verbose = 0;
 
@@ -762,7 +762,16 @@ static int chanconfig(char *keyword, char *args)
                        } else {
                                fprintf(stderr, "Huh? (%s)\n", keyword);
                        }
-                       if (is_digital)
+
+                       if (cc[x].sigtype != DAHDI_SIG_CAS &&
+                           cc[x].sigtype != DAHDI_SIG_DACS &&
+                           cc[x].sigtype != DAHDI_SIG_DACS_RBS) {
+                               if (NULL != idle) {
+                                       fprintf(stderr, "WARNING: idlebits are not valid on %s channels.\n", sig[x]);
+                               }
+                       }
+
+                       if (is_digital) 
                                chan2span[x] = current_span;
                        else
                                current_span = 0;
@@ -817,8 +826,9 @@ static int apply_fiftysix(void)
        int chanfd;
 
        for (x = 1; x < DAHDI_MAX_CHANNELS; x++) {
-               if (skip_channel(x))
+               if (skip_channel(x) || !cc[x].sigtype)
                        continue;
+
                chanfd = open("/dev/dahdi/channel", O_RDWR);
                if (chanfd == -1) {
                        fprintf(stderr, 
@@ -1581,7 +1591,7 @@ int main(int argc, char *argv[])
                        force++;
                        break;
                case 't':
-                       fo_real = 0;
+                       dry_run = 1;
                        break;
                case 's':
                        stopmode = 1;
@@ -1674,9 +1684,9 @@ finish:
        if (verbose) {
                printconfig(fd);
        }
-       if (!fo_real) 
-               exit(0);
 
+       if (dry_run)
+               exit(0);
        
        if (debug & DEBUG_APPLY) {
                printf("About to open Master device\n");