summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--omfile.c1
-rw-r--r--omfwd.c1
-rw-r--r--ommysql.c1
-rw-r--r--omshell.c1
-rw-r--r--omusrmsg.c2
-rw-r--r--syslogd-types.h2
-rw-r--r--syslogd.c12
7 files changed, 10 insertions, 10 deletions
diff --git a/omfile.c b/omfile.c
index e035545a..d335fc9d 100644
--- a/omfile.c
+++ b/omfile.c
@@ -69,7 +69,6 @@ static void cflineParseOutchannel(selector_t *f, uchar* p)
* extend it...
*/
f->f_type = F_FILE;
- f->doAction = doActionFile;
++p; /* skip '$' */
i = 0;
diff --git a/omfwd.c b/omfwd.c
index b5979a0e..35159630 100644
--- a/omfwd.c
+++ b/omfwd.c
@@ -395,7 +395,6 @@ static rsRetVal parseSelectorAct(uchar **pp, selector_t *f)
hints.ai_flags = AI_NUMERICSERV;
hints.ai_family = family;
hints.ai_socktype = f->f_un.f_forw.protocol == FORW_UDP ? SOCK_DGRAM : SOCK_STREAM;
- f->doAction = doActionFwd;
if( (error = getaddrinfo(f->f_un.f_forw.f_hname, getFwdSyslogPt(f), &hints, &res)) != 0) {
f->f_type = F_FORW_UNKN;
f->f_prevcount = INET_RETRY_MAX;
diff --git a/ommysql.c b/ommysql.c
index aa9d83e8..afa46906 100644
--- a/ommysql.c
+++ b/ommysql.c
@@ -305,7 +305,6 @@ static rsRetVal parseSelectorAct(uchar **pp, selector_t *f)
"database functionality - ignored");
#else /* WITH_DB defined! */
f->f_type = F_MYSQL;
- f->doAction = doActionMySQL;
p++;
/* Now we read the MySQL connection properties
diff --git a/omshell.c b/omshell.c
index 8dd4b0c8..0718e66d 100644
--- a/omshell.c
+++ b/omshell.c
@@ -84,7 +84,6 @@ static rsRetVal parseSelectorAct(uchar **pp, selector_t *f)
cflineParseFileName(f, p);
if (f->f_type == F_FILE) {
f->f_type = F_SHELL;
- f->doAction = doActionShell;
}
break;
default:
diff --git a/omusrmsg.c b/omusrmsg.c
index cdb3981c..edd8c19e 100644
--- a/omusrmsg.c
+++ b/omusrmsg.c
@@ -236,7 +236,6 @@ static rsRetVal parseSelectorAct(uchar **pp, selector_t *f)
if(*p == '*') { /* wall */
dprintf ("write-all");
f->f_type = F_WALL;
- f->doAction = doAction;
if(*(p+1) == ';') {
/* we have a template specifier! */
p += 2; /* eat "*;" */
@@ -261,7 +260,6 @@ static rsRetVal parseSelectorAct(uchar **pp, selector_t *f)
*/
dprintf ("users: %s\n", p); /* ASP */
f->f_type = F_USERS;
- f->doAction = doAction;
for (i = 0; i < MAXUNAMES && *p && *p != ';'; i++) {
for (q = p; *q && *q != ',' && *q != ';'; )
q++;
diff --git a/syslogd-types.h b/syslogd-types.h
index d4e9e81d..ee29c68a 100644
--- a/syslogd-types.h
+++ b/syslogd-types.h
@@ -135,7 +135,6 @@ struct syslogTime {
*/
struct filed {
struct filed *f_next; /* next in linked list */
- int (*doAction)(struct filed *); /* method to call to perform an action */
short f_type; /* entry type, see below */
short f_file; /* file descriptor */
time_t f_time; /* time this was last written */
@@ -147,6 +146,7 @@ struct filed {
EHostnameCmpMode eHostnameCmpMode;
rsCStrObj *pCSHostnameComp;/* hostname to check */
rsCStrObj *pCSProgNameComp; /* tag to check or NULL, if not to be checked */
+ struct moduleInfo *pMod; /* pointer to output module handling this selector */
union {
u_char f_pmask[LOG_NFACILITIES+1]; /* priority mask */
struct {
diff --git a/syslogd.c b/syslogd.c
index aff23708..61f2ee46 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -2325,6 +2325,10 @@ static void processMsg(msg_t *pMsg)
assert(pMsg != NULL);
+#if 0 /* TODO: I temporarily disable the emergency logging system. We must re-think
+ * how this is done, as we now have modules.
+ * rgerhards, 2007-07-24
+ */
/* log the message to the particular outputs */
if (!Initialized) {
/* If we reach this point, the daemon initialization FAILED. That is,
@@ -2369,6 +2373,7 @@ static void processMsg(msg_t *pMsg)
}
return; /* we are done with emergency loging */
}
+#endif
for (f = Files; f != NULL ; f = f->f_next) {
/* first, we need to check if this is a disabled (F_UNUSED)
@@ -3310,7 +3315,9 @@ void fprintlog(register selector_t *f)
f->f_time = now; /* we need this for message repeation processing TODO: why must it be global now? */
if(f->f_type != F_UNUSED) {
- f->doAction(f); /* call configured action */
+ if(f->pMod->mod.om.doAction != NULL) /* safety check */
+ f->pMod->mod.om.doAction(f); /* call configured action */
+ // TODO: this causes problems for the emergency logging system!
}
if (f->f_type != F_FORW_UNKN)
@@ -4624,11 +4631,9 @@ void cflineParseFileName(selector_t *f, uchar* p)
if(*p == '|') {
f->f_type = F_PIPE;
- f->doAction = doActionFile;
++p;
} else {
f->f_type = F_FILE;
- f->doAction = doActionFile;
}
pName = f->f_un.f_file.f_fname;
@@ -5096,6 +5101,7 @@ static rsRetVal cfline(char *line, register selector_t *f)
if(iRet == RS_RET_CONFLINE_PROCESSED) {
dprintf("Module %s processed this config line.\n",
modGetName(pMod));
+ f->pMod = pMod;
break;
}
else if(iRet != RS_RET_CONFLINE_UNPROCESSED) {