about peerGetSomeParent()

From: atit_ldce <atit_ldce@dont-contact.us>
Date: Wed, 19 Mar 2003 15:57:57 +0530 (GMT+05:30)

i have confusion in following code...

if ((p = getDefaultParent(request))) {
        code = DEFAULT_PARENT;
    } else if ((p = getRoundRobinParent(request))) {
        code = ROUNDROBIN_PARENT;
    } else if ((p = getFirstUpParent(request))) {
        code = FIRSTUP_PARENT;
    } else if ((p = getAnyParent(request))) {
        code = ANY_OLD_PARENT;
    }
if (code != HIER_NONE) {
        debug(44, 3) ("peerSelect: %s/%s\n", hier_strings[code], p->host);
        peerAddFwdServer(&ps->servers, p, code);
    }

stmt p = getDefaultParent(request) are assignment stmt
so outcome of if cond is definately 0
in this case
code will be HIER_NONE.

does it indicate error in code or it has any other purpose?

_____________________________________________________________________
Get your internet connection from the fastest growing digital network.
ICENET
visit our site www.icenet.net
Received on Tue Mar 18 2003 - 22:02:38 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:19:33 MST