getServerGroup

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

 



I think the getServerGroup function (group.c) is wrong.
According to the config.servers comments, servers will be consulted in
order that they appear on the list.  The following code seems to do the
opposite:

        for (gcf = GroupList; gcf; gcf = gcf->next)
                if (matchExp (gcf->group_pat, group, 1, 0))
                        gcf2 = gcf;

It will find the last match rather than the first match.
I think it should be changed as follows:
{
        struct group_cfg *gcf = NULL;

        for (gcf = GroupList; gcf; gcf = gcf->next)
                if (matchExp (gcf->group_pat, group, 1, 0))
                        return gfc->server_cfg;
        return NULL;
}

-Ralph

"Reason over Passion" - Pierre Trudeau


[Index of Archives]     [Yosemite]     [Yosemite Campsites]     [Bugtraq]     [Linux]     [Trn]

Powered by Linux