The lookup was broken by commit
050536d5. The server ID is
initialized to a negative value but unfortunately not all the
tests were converted. Thanks to Igor at owind for reporting it.
return 0;
for (s = p->srv; s; s = s->next)
- if ((sid && s->puid == sid) ||
- (!sid && strcmp(s->id, sv_name) == 0))
+ if ((sid >= 0 && s->puid == sid) ||
+ (sid < 0 && strcmp(s->id, sv_name) == 0))
break;
*sv = s;
if (!s)