mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-29 10:11:49 -04:00
BUG: proxy: fix server name lookup in get_backend_server()
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.
This commit is contained in:
parent
a1629a59d1
commit
4055a107a7
1 changed files with 2 additions and 2 deletions
|
|
@ -115,8 +115,8 @@ int get_backend_server(const char *bk_name, const char *sv_name,
|
|||
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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue