[icinga-checkins] icinga.org: icinga-core/master: add a check to nebmod loader if 'idomod.o' should be loaded, now only warn

git at icinga.org git at icinga.org
Mon Apr 30 18:01:48 CEST 2012


Module: icinga-core
Branch: master
Commit: 453ed8eaeed7982421bdbb4d1ccbbfdc8fe0d646
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=453ed8eaeed7982421bdbb4d1ccbbfdc8fe0d646

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Fri Apr 27 19:00:13 2012 +0200

add a check to nebmod loader if 'idomod.o' should be loaded, now only warn

refs #2558

---

 base/nebmods.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/base/nebmods.c b/base/nebmods.c
index 1c0afc4..c69f97d 100644
--- a/base/nebmods.c
+++ b/base/nebmods.c
@@ -183,6 +183,10 @@ int neb_load_module(nebmodule *mod) {
 	if (mod->should_be_loaded == FALSE)
 		return ERROR;
 
+	/* add a compatibility check for 1.7 change of idomod.o -> idomod.so */
+	if (strstr(mod->filename, "idomod.o") != NULL)
+		logit(NSLOG_RUNTIME_ERROR, FALSE, "Error: trying to load module '%s' which has been deprecated! Check Changelog and upgrade docs!\n", mod->filename);
+
 	/**********
 	   Using dlopen() is great, but a real danger as-is.  The problem with loaded modules is that if you overwrite the original file (e.g. using 'mv'),
 	   you do not alter the inode of the original file.  Since the original file/module is memory-mapped in some fashion, Icinga will segfault the next





More information about the icinga-checkins mailing list