CLEANUP: Replace repeated code to count usable servers with be_usable_srv()
authorNenad Merdanovic <nmerdan@haproxy.com>
Sun, 12 Mar 2017 20:56:56 +0000 (21:56 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 13 Mar 2017 17:26:05 +0000 (18:26 +0100)
commit2754fbcfd6ce7f812a1c1b59dc8ddb0a44721f95
tree5b218ac4c0e0f72cb141ade6b829cf110e24acd2
parentb7e7c4720ad06aba630c92a7d94b891b93f66df6
CLEANUP: Replace repeated code to count usable servers with be_usable_srv()

2 places were using an open-coded implementation of this function to count
available servers. Note that the avg_queue_size() fetch didn't check that
the proxy was in STOPPED state so it would possibly return a wrong server
count here but that wouldn't impact the returned value.

Signed-off-by: Nenad Merdanovic <nmerdan@haproxy.com>
src/backend.c