- if (!cptr && (Links(cltmp) < MaxLinks(cltmp)) &&
- (!connecting /*|| (ConClass(cltmp) > con_class)*/)) {
- /*
- * Check connect rules to see if we're allowed to try
- */
- if (0 == conf_eval_crule(aconf->name, CRULE_MASK)) {
- con_class = ConClass(cltmp);
- con_conf = aconf;
- /* We connect only one at time... */
- connecting = TRUE;
- }
- }
- if ((next > aconf->hold) || (next == 0))
- next = aconf->hold;
- }
- if (connecting) {
- if (con_conf->next) { /* are we already last? */
- /* Put the current one at the end and make sure we try all connections */
- for (pconf = &GlobalConfList; (aconf = *pconf); pconf = &(aconf->next))
- if (aconf == con_conf)
+ /* Ensure it is at the end of the list for future checks. */
+ if (aconf->next) {
+ /* Find aconf's location in the list and splice it out. */
+ for (pconf = &GlobalConfList; *pconf; pconf = &(*pconf)->next)
+ if (*pconf == aconf)