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.
diff --git a/src/proxy.c b/src/proxy.c
index 914d979..9ccd25a 100644
--- a/src/proxy.c
+++ b/src/proxy.c
@@ -115,8 +115,8 @@
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)