Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 168890 | Differences between
and this patch

Collapse All | Expand All

(-)hylafax.orig/faxd/Class1.c++ (-9 / +32 lines)
Lines 1454-1469 Link Here
1454
		    rhcnt = 0;
1454
		    rhcnt = 0;
1455
		    traceFCF(dir == FCF_SNDR ? "SEND send" : "RECV send", FCF_CRP);
1455
		    traceFCF(dir == FCF_SNDR ? "SEND send" : "RECV send", FCF_CRP);
1456
		}
1456
		}
1457
		startTimeout(ms);
1457
		do {
1458
		if (!(atCmd(rhCmd, AT_NOTHING, 0) && waitFor(AT_CONNECT,0))) {
1458
		    lastResponse = AT_NOTHING;
1459
		    stopTimeout("waiting for v.21 carrier");
1459
		    startTimeout(ms);
1460
		    if (wasTimeout()) {
1460
		    if (!(atCmd(rhCmd, AT_NOTHING, 0) && waitFor(AT_CONNECT,0))) {
1461
			abortReceive();
1461
			stopTimeout("waiting for v.21 carrier");
1462
			setTimeout(false);
1462
			if (wasTimeout()) {
1463
			    abortReceive();
1464
			    setTimeout(false);
1465
			}
1466
			if (lastResponse != AT_NOCARRIER || rhcnt++ > 30) return (false);
1463
		    }
1467
		    }
1464
		    return (false);
1468
		    stopTimeout("waiting for v.21 carrier");
1465
		}
1469
		    /*
1466
		stopTimeout("waiting for v.21 carrier");
1470
		     * The meaning of a direct NO CARRIER response/result to the AT+FRH=3 
1471
		     * command can be interpreted two ways due to wording in ITU T.31.
1472
		     * The more traditional interpretation is that it is out-of-spec: that
1473
		     * a NO CARRIER response should only come after a CONNECT message.
1474
		     * However, T.31 gives sample sessions that illustrate precisely this 
1475
		     * kind of out-of-spec sequence:
1476
		     *
1477
		     * <-- AT+FRH=3
1478
		     * --> NO CARRIER
1479
		     *
1480
		     * And the interpretation is clear to indicate that in this case the
1481
		     * modem detected a carrier, but it apparently was not V.21 HDLC, and
1482
		     * the NO CARRIER response indicates that the indeterminate carrier
1483
		     * has dropped.  This functionality is more cumbersome than it is
1484
		     * helpful (its value is not much different than that of an AT+FRS=1 
1485
		     * command), and what it really means is that we just need to re-issue 
1486
		     * the AT+FRH=3 command until we get something useful as this scenario
1487
		     * will most likely occur on incidence of Phase C premature carrier loss.
1488
		     */
1489
		} while (lastResponse == AT_NOCARRIER);
1467
	    }
1490
	    }
1468
	    frame.reset();
1491
	    frame.reset();
1469
            gotframe = recvRawFrame(frame);
1492
            gotframe = recvRawFrame(frame);

Return to bug 168890