On ons, 2008-08-13 at 15:18 +1200, Amos Jeffries wrote:
> >
> > Checking... code broken. Not Windows specific.
> >
> 
> How so? Endian problems?

    /* Decode addr2 */
    if (*addr2 && !(q->addr2=addr2) ) {
        debugs(28, 0, "aclIpParseIpData: unknown second address in '" <<
t << "'");
        delete q;
        self_destruct();
        return NULL;
    }
    else q->addr2 = addr2;

This assignment sets addr2 to "255.255.255.255" as addr2 is "".


> What do the unit-tests do?

No idea. Didn't run them (no cppunit in my mingw installation). The
problem was very visible in gdb.

I fixed it by = addr1, which works but maybe isn't optimal.. probably
should be SetEmpty() instead..

Or maybe = "" should be equivalent to SetEmpty() in which case the
original code works, and can be simplified a lot... not sure how
IPAddress is supposed to work here, if it at all is supposed to be used
in = ""..

Regards
Henrik

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to