--- autofs-4.1.3/modules/mount_nfs.c.replicated_server_select 2004-10-16 16:49:03.000000000 +0800 +++ autofs-4.1.3/modules/mount_nfs.c 2004-10-19 20:52:53.000000000 +0800 @@ -223,12 +223,8 @@ continue; } - /* see if we have a previous 'winner' */ - if (!winner) { - winner = p; - } /* compare RPC times if there are no weighted hosts */ - else if (winner_weight == INT_MAX) { + if (winner_weight == INT_MAX) { int status; double resp_time; unsigned int vers = NFS2_VERSION; @@ -239,12 +235,13 @@ proto = ping_stat & 0xff00; } - status = rpc_time(winner, vers, proto, sec, micros, &resp_time); + status = rpc_time(p, vers, proto, sec, micros, &resp_time); /* did we time the first winner? */ if (winner_time == 0) { - if (status) + if (status) { + winner = p; winner_time = resp_time; - else + } else winner_time = 6; } else { if ((status) && (resp_time < winner_time)) {