Hylafax Mailing List Archives

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

Re: BUG REPORT: hfaxd dies when it can't resolve own hostname (4.0.8)



Jason M. Petry wrote:
    
    I don't read this list, just reporting a bug I found in hylafax 4.0.8

I don't know what "hylafax 4.0.8" exactly is; your problem was
fixed in HylaFAX v4.0pl2

	matthias
    
    Symptoms: If the system cannot resolve it's own hostname into an
    address, hfaxd will SEGV. Although I've pinpointed where the error is,
    I'm unable to suggest a fix, because I don't understand how hfaxd uses this 
    info. (Sorry) The error occurrs on line 95, of the
    file InetFaxServer.c++ Here is the whole function:
    
    InetFaxServer::InetFaxServer()
    {
        usedefault = TRUE;
        swaitmax = 90;                      // wait at most 90 seconds
        swaitint = 5;                       // interval between retries
    
        memset(&data_dest, 0, sizeof (data_dest));
        data_dest.sin_family = AF_INET;
    
        hostent* hp = Socket::gethostbyname(hostname);
        if (hp != NULL)
            hostname = hp->h_name;
        struct in_addr in;
    
        memcpy(&in, hp->h_addr, sizeof (in));
                    ^^^^^^^^^
    	        This is the problem, if hp is null, this SEGV's
    
        hostaddr = inet_ntoa(in);
    
        fxAssert(_instance == NULL,
            "Cannot create multiple InetFaxServer instances");
        _instance = this;
    }



Home
Report any problems to webmaster@hylafax.org

HylaFAX is a trademark of Silicon Graphics Corporation.
Internet connectivity for hylafax.org is provided by:
VirtuALL Private Host Services