From 4b4726ce6dae79843293f724f85a1164d0edf7c6 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 6 Jun 2014 20:40:53 +0200 Subject: Bail out on startup if an AD server is not reachable --- ldadp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ldadp.c') diff --git a/ldadp.c b/ldadp.c index c044a88..4d481df 100644 --- a/ldadp.c +++ b/ldadp.c @@ -47,7 +47,8 @@ int main(int argc, char **argv) // Add listener if (ePoll_add(EPOLLIN, (epoll_item_t*)&lsn) == -1) bail("Could not add listen socket to epoll fd"); // Init AD uplinks - server_initServers(); + if (!server_initServers()) + exit(1); // Daeaeaemon if (isdaemon && daemon(1, 0) == -1) bail("daemon() failed."); // Do the mainloop -- cgit v1.2.3-55-g7522