HylaFAX The world's most advanced open source fax server

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

Re: WHFC and NT - '': Command not understood - progress?

Alan Sparks wrote:
>  I've been sitting here thinking about this for awhile... now, I'm a newbie
> and don't have a feel for the guts of this thing yet, but it doesn't
> completely feel like a client problem to me.
> I have Hylafax running on a SunOS 4.1.4 system.  Hfaxd is running old and
> new protos on 4557 and 4559.  Also, coincidentally, Sendmail is running
> there too.  If I Windows telnet into port 25, I get Sendmail, and can talk
> via typed commands fine.  If I telnet into port 4557 or 4559, I get the
> Hylafax banner, but the "Syntax error" returned for anything I type (like
> QUIT).
> Telnet sessions from another Sun or HP box work fine under these scenarios.
> My big question at this point is whether there is some socket-based
> irregularity on the hfaxd side, some socket option or whatever, that is
> making hfaxd not read the input correctly.  I've been thinking that I need
> to compare the hfaxd socket-read code against another OK program (like
> sendmail).
> Does this sound plausible?  Ulrich, you say you know approx. where in whfc
> the problem occurs (not necessarily why)... any thoughts you could share?


i got some reports, that you can connect popperly to hfaxd from
Windows NT with telnet clients other than the microsoft one.

The problem occures in the file FaxClient.cpp in the function 
FaxClient::Send(CString *str). This function sends a string 
terminated with cr/lf to the hfaxd. :

BOOL FaxClient::Send(CString *str)
        static char eol[] = {13,10,0};

        TRACE("Send : %s\n",*str);
	// Send string
        if (send(Socket,*str,str->GetLength(),0) <= 0)
                return FALSE;
	// Send CR/LF
        if (send(Socket,eol,2,0) <= 0)
                return FALSE;
        return TRUE;

It looks to me that sun boxes get the cr/lf first and 
receive the string after cr/lf, but i realy don't know why.
This piece of code (the full code if available on our ftp server)
which sends the string is really easy.

Ulrich Eckhardt		                   mailto:uli@transcom.de
Truly great madness can not be achieved without significant
intelligence. (Henrik Tikkanen)

Project hosted by iFAX Solutions