MEDIUM: improve config check return codes
authorWilly Tarreau <w@1wt.eu>
Thu, 2 Feb 2012 16:48:18 +0000 (17:48 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 2 Feb 2012 16:53:37 +0000 (17:53 +0100)
commit8b15ba19c3694e0d3692e292b9504ea797366efb
treed80e97da3d25597f3e424f552ebd29e7e550ad43
parent6f9b003c2b6f885c7bda8a4cdc88404b05e19b61
MEDIUM: improve config check return codes

When checking a configuration file using "-c -f xxx", sometimes it is
reported that a config is valid while it will later fail (eg: no enabled
listener). Instead, let's improve the return values :
  - return 0 if config is 100% OK
  - return 1 if config has errors
  - return 2 if config is OK but no listener nor peer is enabled
src/cfgparse.c
src/haproxy.c