HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [hylafax-users] SEND FAILED: Can not setup modem




> but in   the debug session there is
> "  MODEM initial push zsunbuf failed " not "Modem timeout " .
> It is same kind of error ?
> 
...
> May 23 10:13:51 ultra FaxSend[17900]: MODEM input buffering disabled
> May 23 10:13:51 ultra FaxSend[17900]: MODEM initial push zsunbuf failed
...
> May 23 10:14:02 ultra FaxSend[17900]: SEND FAILED: Can not setup modem


Here is the code where it fails:

-------------------------------------------------------------------
/*
 * Setup process state either for minimum latency (no buffering)
 * or reduced latency (input may be buffered).  We fiddle with
 * the termio structure and, if required, the streams timer
 * that delays the delivery of input data from the UART module
 * upstream to the tty module.
 */
bool
ModemServer::setInputBuffering(bool on)
{
    traceModemOp("input buffering %s", on ? "enabled" : "disabled");      
...
#ifdef sun
    /*
     * SunOS has a timer similar to the SIOC_ITIMER described
     * above for input on the on-board serial ports, but it is
     * not generally accessible because it is controlled by a
     * stream control message (M_CTL w/ either MC_SERVICEDEF or
     * MC_SERVICEIMM) and you can not do a putmsg directly to
     * the UART module and the tty driver does not provide an
     * interface.  Also, the ALM-2 driver apparently also has
     * a timer, but does not provide the M_CTL interface that's
     * provided for the on-board ports.  All in all this means
     * that the only way to defeat the timer for the on-board
     * serial ports (and thereby provide enough control for the
     * fax server to work with Class 1 modems) is to implement
     * a streams module in the kernel that provides an interface
     * to the timer--which is what has been done.  In the case of
     * the ALM-2, however, you are just plain out of luck unless
     * you have source code.
     */
    static bool zsunbuf_push_tried = false;
    static bool zsunbuf_push_ok = false;
    if (on) {                   // pop zsunbuf if present to turn on buffering
        char topmodule[FMNAMESZ+1];          
        if (zsunbuf_push_ok && ioctl(modemFd, I_LOOK, topmodule) >= 0 &&
          streq(topmodule, "zsunbuf")) {
            if (ioctl(modemFd, I_POP, 0) < 0)
                traceModemOp("pop zsunbuf failed: %m");
        }
    } else {                    // push zsunbuf to turn off buffering
        if (!zsunbuf_push_tried) {
            zsunbuf_push_ok = (ioctl(modemFd, I_PUSH, "zsunbuf") >= 0);
            traceModemOp("initial push zsunbuf %s",
                zsunbuf_push_ok ? "succeeded" : "failed");
            zsunbuf_push_tried = true;
        } else if (zsunbuf_push_ok) {
            if (ioctl(modemFd, I_PUSH, "zsunbuf") < 0)
                traceModemOp("push zsunbuf failed: %m"); <-------------------------------
        }
    }
#endif  
----------------------------------------------------------------

Bernd



____________________ HylaFAX(tm) Users Mailing List _______________________
 To unsub: mail -s unsubscribe hylafax-users-request@hylafax.org < /dev/null




Project hosted by iFAX Solutions