diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-03-05 14:53:25 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-03-05 14:53:25 +0000 |
commit | 24b02dc831889986211600a75572737e733ef9d8 (patch) | |
tree | 50e1525e5749c8b6e51969d8ff88060a172b0497 /action.c | |
parent | 213e0b596205626214891fb46e1a780af7f26a8b (diff) | |
download | rsyslog-24b02dc831889986211600a75572737e733ef9d8.tar.gz rsyslog-24b02dc831889986211600a75572737e733ef9d8.tar.xz rsyslog-24b02dc831889986211600a75572737e733ef9d8.zip |
- extracted logerror*() family of functions from syslogd, made them their
own class and converted to new object calling conventions
(interface-based)
- converted gss-misc into a loadable library module
Diffstat (limited to 'action.c')
-rw-r--r-- | action.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -40,6 +40,7 @@ #include "sync.h" #include "cfsysline.h" #include "srUtils.h" +#include "errmsg.h" /* forward definitions */ rsRetVal actionCallDoAction(action_t *pAction, msg_t *pMsg); @@ -47,6 +48,7 @@ rsRetVal actionCallDoAction(action_t *pAction, msg_t *pMsg); /* object static data (once for all instances) */ DEFobjStaticHelpers DEFobjCurrIf(module) +DEFobjCurrIf(errmsg) static int glbliActionResumeInterval = 30; int glbliActionResumeRetryCount = 0; /* how often should suspended actions be retried? */ @@ -209,11 +211,11 @@ actionConstructFinalize(action_t *pThis) /* ... set some properties ... */ # define setQPROP(func, directive, data) \ CHKiRet_Hdlr(func(pThis->pQueue, data)) { \ - logerrorInt("Invalid " #directive ", error %d. Ignored, running with default setting", iRet); \ + errmsg.LogError(NO_ERRCODE, "Invalid " #directive ", error %d. Ignored, running with default setting", iRet); \ } # define setQPROPstr(func, directive, data) \ CHKiRet_Hdlr(func(pThis->pQueue, data, (data == NULL)? 0 : strlen((char*) data))) { \ - logerrorInt("Invalid " #directive ", error %d. Ignored, running with default setting", iRet); \ + errmsg.LogError(NO_ERRCODE, "Invalid " #directive ", error %d. Ignored, running with default setting", iRet); \ } queueSetpUsr(pThis->pQueue, pThis); @@ -460,7 +462,7 @@ static rsRetVal setActionQueType(void __attribute__((unused)) *pVal, uchar *pszT ActionQueType = QUEUETYPE_DIRECT; dbgprintf("action queue type set to DIRECT (no queueing at all)\n"); } else { - logerrorSz("unknown actionqueue parameter: %s", (char *) pszType); + errmsg.LogError(NO_ERRCODE, "unknown actionqueue parameter: %s", (char *) pszType); iRet = RS_RET_INVALID_PARAMS; } d_free(pszType); /* no longer needed */ @@ -685,6 +687,7 @@ rsRetVal actionClassInit(void) /* request objects we use */ CHKiRet(objGetObjInterface(&obj)); /* this provides the root pointer for all other queries */ CHKiRet(objUse(module, CORE_COMPONENT)); + CHKiRet(objUse(errmsg, CORE_COMPONENT)); finalize_it: RETiRet; |