summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-08-09 13:30:12 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-08-09 13:30:12 +0000
commit16a59b29b76b6266cfcca3c4aa748f85306b650c (patch)
tree8514097666cad2214b8fa53f80ded4665e04f054
parent8940c4125501cc7e28b38c00620c463499333dca (diff)
downloadrsyslog-16a59b29b76b6266cfcca3c4aa748f85306b650c.tar.gz
rsyslog-16a59b29b76b6266cfcca3c4aa748f85306b650c.tar.xz
rsyslog-16a59b29b76b6266cfcca3c4aa748f85306b650c.zip
added interface API for unloading module (a dummy)
-rw-r--r--modules.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/modules.c b/modules.c
index 18a7cdd9..01bba104 100644
--- a/modules.c
+++ b/modules.c
@@ -164,6 +164,31 @@ modInfo_t *omodGetNxt(modInfo_t *pThis)
}
+/* unload a module. If this is called with a statically-linked
+ * (builtin) module, nothing happens.
+ * The module handle is invalid after this function call and
+ * MUST NOT be used any more.
+ * This is currently a dummy, to be filled when we have a plug-in interface
+ * rgerhards, 2007-08-09
+ */
+static rsRetVal modUnload(modInfo_t *pThis)
+{
+ DEFiRet;
+
+ assert(pThis != NULL);
+
+ if(pThis->eLinkType == eMOD_LINK_STATIC) {
+ ABORT_FINALIZE(RS_RET_OK);
+ }
+
+ /* TODO: implement code */
+ ABORT_FINALIZE(RS_RET_NOT_IMPLEMENTED);
+
+finalize_it:
+ return iRet;
+}
+
+
/* Add an already-loaded module to the module linked list. This function does
* everything needed to fully initialize the module.
*/
@@ -237,6 +262,7 @@ rsRetVal doModInit(rsRetVal (*modInit)(int, int*, rsRetVal(**)(), rsRetVal(*)())
pNew->pszName = (uchar*) strdup((char*)name); /* we do not care if strdup() fails, we can accept that */
pNew->eType = eMOD_OUT; /* TODO: take this from module */
+ pNew->eLinkType = eMOD_LINK_STATIC; /* TODO: take this from module */
/* we initialized the structure, now let's add it to the linked list of modules */
addModToList(pNew);