]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
[Bug 135] allows use of "none" in five config options
authorDarren Nickerson <darren.nickerson@ifax.com>
Mon, 4 Jun 2001 05:09:46 +0000 (05:09 +0000)
committerDarren Nickerson <darren.nickerson@ifax.com>
Mon, 4 Jun 2001 05:09:46 +0000 (05:09 +0000)
config/att-dpexpress-2
config/elsa-microlink-56k-basic-2.0
config/gvc-288-2
config/usr-2.0
faxd/Class2.c++
man/config.4f

index 333011720935194d0ac40dbd3570513c687124c2..80485245665f5bf21256219a74842eb4087f06a6 100644 (file)
@@ -70,9 +70,9 @@ Class2RecvDataTrigger:        "\022"          # character sent to modem to start recv
 # naive--so we disable them here.
 #
 Class2CQQueryCmd:      AT      # +FAQ=? query for copy quality capabilities
-Class2APQueryCmd:      AT      # +FAP=? not supported on this modem
-Class2SPLCmd:          AT      # +FSPL= Request to Poll
-Class2TBCCmd:           AT     # +FTBC= Phase C Trasmit Data Block Size
-Class2PHCTOCmd:                AT      # +FPHCTO= phase C timeout parameter
-Class2BugCmd:          AT      # +FBUG= HDLC frame tracing
+Class2APQueryCmd:      none    # +FAP=? not supported on this modem
+Class2SPLCmd:          none    # +FSPL= Request to Poll
+Class2TBCCmd:           none   # +FTBC= Phase C Trasmit Data Block Size
+Class2PHCTOCmd:                none    # +FPHCTO= phase C timeout parameter
+Class2BugCmd:          none    # +FBUG= HDLC frame tracing
 
index 2d90250da6c8920dae9e8ca6761f726a3b3ae45a..a0884a4adb4dca7b77ca47d3eab0110d949afeac 100644 (file)
@@ -108,3 +108,4 @@ Class2SPLCmd:           AT+FSP          # set polling indicator command
 Class2NFLOCmd:          AT+FLO=0        # set no flow control command
 Class2SFLOCmd:          AT+FLO=1        # set software flow control command
 Class2HFLOCmd:          AT+FLO=2        # set hardware flow control command
+Class2APQueryCmd:      none            # not supported
index 06b8ab55db7b8b448736129f9b0dafb22dd759e3..47b64c4371b93c2d3d27604787dbd4a5ea448f06 100644 (file)
@@ -70,5 +70,5 @@ Class2RecvDataTrigger:        "\022"          # character sent to modem to start recv
 # but generates an ERROR result that can generate questions from the
 # naive--so we disable them here.
 #
-Class2TBCCmd:          AT              # setup stream mode
-Class2PHCTOCmd:                AT              # set phase C timeout parameter
+Class2TBCCmd:          none            # setup stream mode
+Class2PHCTOCmd:                none            # set phase C timeout parameter
index ad76da553ed8af0f536e1502e095d19980fcc3aa..798f009c2f54cd7280de8918deb3328d93cea453 100644 (file)
@@ -86,4 +86,4 @@ Class2SendRTC:        yes
 #
 # +FAP=? not supported on this modem, gives ERROR in ServerTracing
 #
-Class2APQueryCmd:       AT
+Class2APQueryCmd:       none
index a3b46cf0a0bf0374b7b446a90c060a84e8e34800..646bc73494e21089c15b44b3e9be162a6ec66b67 100644 (file)
@@ -123,8 +123,11 @@ Class2Modem::setupModem()
     int sub = 0;
     int sep = 0;
     int pwd = 0;
-    if (doQuery(conf.class2APQueryCmd, s))
-       (void) vparseRange(s, 3, &sub, &sep, &pwd);
+    // some modems don't support an AP-query command
+    if (strcasecmp(conf.class2APQueryCmd, "none") != 0) {
+       if (doQuery(conf.class2APQueryCmd, s))
+           (void) vparseRange(s, 3, &sub, &sep, &pwd);
+    }
     if (sub & BIT(1)) {
        saCmd = conf.class2SACmd;
        modemSupports("subaddressing");
@@ -146,8 +149,11 @@ Class2Modem::setupModem()
      * Check if the modem supports polled reception of documents.
      */
     u_int t;
-    if (doQuery(splCmd | "=?", s) && FaxModem::parseRange(s, t))
-       hasPolling = (t & BIT(1)) != 0;
+    // some modems don't support an SPL command
+    if (strcasecmp(splCmd, "none") != 0) {
+       if (doQuery(splCmd | "=?", s) && FaxModem::parseRange(s, t))
+           hasPolling = (t & BIT(1)) != 0;
+    }
     /*
      * Define the code to send to the modem to trigger the
      * transfer of received Phase C data to the host.  Most
@@ -212,7 +218,10 @@ Class2Modem::setupClass2Parameters()
     if (modemServices & serviceType) {         // when resetting at startup
        atCmd(classCmd);
        setupFlowControl(flowControl);          // flow control
-       atCmd(tbcCmd);                          // stream mode
+       // some modems don't support a TBC command
+       if (strcasecmp(tbcCmd, "none") != 0) {
+           atCmd(tbcCmd);                      // stream mode
+       }
        atCmd(borCmd);                          // Phase B+C bit order
        /*
         * Set Phase C data transfer timeout parameter.
@@ -222,13 +231,17 @@ Class2Modem::setupClass2Parameters()
         * do not support this command (or perhaps they
         * hide it under a different name).
         */
-       atCmd(phctoCmd);
+       if (strcasecmp(phctoCmd, "none") != 0) {
+           atCmd(phctoCmd);
+       }
 
        (void) atCmd(cqCmds);                   // copy quality checking
        (void) atCmd(nrCmd);                    // negotiation reporting
        (void) atCmd(apCmd);                    // address&polling reporting
        (void) atCmd(pieCmd);                   // program interrupt enable
-       if (getHDLCTracing())                   // HDLC frame tracing
+                                               // HDLC frame tracing
+       // some modems don't support a BUG command
+       if (getHDLCTracing() && strcasecmp(bugCmd, "none") != 0)
            atCmd(bugCmd);
        /*
         * Force the DCC so that we can override
index 33fbc33927dd6f7e7d29bb1b525159f4bcce8f7b..21b5ad70b059a502c7cdac7abfafe30fbd19fefb 100644 (file)
@@ -2024,6 +2024,8 @@ SUB, SEP, and PWD frames.
 A largely unused option for modems supporting ITU-T.32, Class 2.1, 
 standards.  This command would be used to query the capabilities of 
 sending and receiving SUB, SEP, and PWD frames.
+The value ``none'' may be used if the modem does not support any
+.B Class2APQueryCmd.
 .TP
 .B Class2BORCmd
 The command to setup the bit order of sent and
@@ -2053,6 +2055,8 @@ This tracing information should be returned to the host in ``\s-1+FHR:\s+1''
 and ``\s-1+FHT:\s+1'' status strings.
 Note that many Class 2 modems do not support this facility, 
 which is largely used for diagnostic purposes.
+The value ``none'' may be used if the modem does not support any
+.B Class2BUGCmd.
 .TP
 .B Class2CIGCmd
 The command used to set a polling identifier.
@@ -2153,6 +2157,8 @@ string enabled by the
 .TP
 .B Class2PHCTOCmd
 The command to use to set the Phase C timeout parameter (in seconds).
+The value ``none'' may be used if the modem does not support any
+.B Class2PHCTOCmd.
 .TP
 .B Class2PIECmd
 (\fIClass 2.0 only\fP)
@@ -2241,10 +2247,14 @@ For Class 2.0 operation the default is ``\s-1AT+FLO=1\s+1''.
 .TP
 .B Class2SPLCmd
 The command to use to enable a polling request.
+The value ``none'' may be used if the modem does not support any
+.B Class2SPLCmd.
 .TP
 .B Class2TBCCmd
 The command to use to enable stream-mode communication between the
 host and modem.
+The value ``none'' may be used if the modem does not support any
+.B Class2TBCCmd.
 .TP
 .B Class2XmitWaitForXON
 Whether or not to wait for an