Re: Environment to build a squid helper

From: Henrik Nordstrom <henrik_at_henriknordstrom.net>
Date: Wed, 13 Aug 2008 05:57:47 +0200

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

Received on Wed Aug 13 2008 - 03:57:51 MDT

This archive was generated by hypermail 2.2.0 : Wed Aug 13 2008 - 12:00:05 MDT