Fix oversight in build_server_array().

The index computation went awry when servers are disabled
by the loop-detection system.

Thanks to Xingcong Li for spotting this.
This commit is contained in:
Simon Kelley
2021-07-01 22:35:18 +01:00
parent 5e95c16c32
commit 3ef955c85a

View File

@@ -65,7 +65,7 @@ void build_server_array(void)
count = 0;
for (serv = daemon->servers; serv; serv = serv->next, count++)
for (serv = daemon->servers; serv; serv = serv->next)
#ifdef HAVE_LOOP
if (!(serv->flags & SERV_LOOP))
#endif
@@ -73,6 +73,7 @@ void build_server_array(void)
daemon->serverarray[count] = serv;
serv->serial = count;
serv->last_server = -1;
count++;
}
for (serv = daemon->local_domains; serv; serv = serv->next, count++)