[icinga-checkins] icinga.org: icinga-core/test/core: unlink leftover socket on startup, if using unix sockets

git at icinga.org git at icinga.org
Thu Jan 10 20:24:05 CET 2013


Module: icinga-core
Branch: test/core
Commit: 8aad32b220f9e2672ebaba8a296537ba171ac74c
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=8aad32b220f9e2672ebaba8a296537ba171ac74c

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Wed Jan  2 19:02:09 2013 +0100

unlink leftover socket on startup, if using unix sockets

---

 module/idoutils/src/ido2db.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/module/idoutils/src/ido2db.c b/module/idoutils/src/ido2db.c
index b6b5e7b..ea94dd6 100644
--- a/module/idoutils/src/ido2db.c
+++ b/module/idoutils/src/ido2db.c
@@ -297,6 +297,10 @@ int main(int argc, char **argv) {
 	/* open debug log */
 	ido2db_open_debug_log();
 
+        /* unlink leftover socket */
+        if (ido2db_socket_type == IDO_SINK_UNIXSOCKET)
+                unlink(ido2db_socket_name);
+
 	/* if we're running under inetd... */
 	if (ido2db_use_inetd == IDO_TRUE) {
 





More information about the icinga-checkins mailing list