summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--action.c2
-rw-r--r--dirty.h2
-rw-r--r--runtime/errmsg.c2
-rw-r--r--runtime/errmsg.h2
-rw-r--r--runtime/rsyslog.c8
-rw-r--r--runtime/rsyslog.h4
-rw-r--r--tools/syslogd.c5
7 files changed, 12 insertions, 13 deletions
diff --git a/action.c b/action.c
index d46e1af8..71b114d0 100644
--- a/action.c
+++ b/action.c
@@ -605,7 +605,7 @@ static void actionDisable(action_t *pThis)
}
-/* Suspend action, this involves changing the acton state as well
+/* Suspend action, this involves changing the action state as well
* as setting the next retry time.
* if we have more than 10 retries, we prolong the
* retry interval. If something is really stalled, it will
diff --git a/dirty.h b/dirty.h
index e0a6e26e..c0c0524b 100644
--- a/dirty.h
+++ b/dirty.h
@@ -32,7 +32,7 @@ rsRetVal multiSubmitMsg2(multi_submit_t *pMultiSub); /* friends only! */
rsRetVal submitMsg2(msg_t *pMsg);
rsRetVal __attribute__((deprecated)) submitMsg(msg_t *pMsg);
rsRetVal multiSubmitFlush(multi_submit_t *pMultiSub);
-rsRetVal logmsgInternal(int iErr, int pri, uchar *msg, int flags);
+rsRetVal logmsgInternal(const int iErr, const int pri, const uchar *msg, int flags);
rsRetVal __attribute__((deprecated)) parseAndSubmitMessage(uchar *hname, uchar *hnameIP, uchar *msg, int len, int flags, flowControl_t flowCtlTypeu, prop_t *pInputName, struct syslogTime *stTime, time_t ttGenTime, ruleset_t *pRuleset);
rsRetVal diagGetMainMsgQSize(int *piSize); /* for imdiag */
rsRetVal createMainQueue(qqueue_t **ppQueue, uchar *pszQueueName, struct nvlst *lst);
diff --git a/runtime/errmsg.c b/runtime/errmsg.c
index dcb5b185..55d013ea 100644
--- a/runtime/errmsg.c
+++ b/runtime/errmsg.c
@@ -57,7 +57,7 @@ DEFobjStaticHelpers
* rgerhards, 2008-06-27
*/
static void __attribute__((format(printf, 3, 4)))
-LogError(int iErrno, int iErrCode, char *fmt, ... )
+LogError(int iErrno, int iErrCode, const char *fmt, ... )
{
va_list ap;
char buf[1024];
diff --git a/runtime/errmsg.h b/runtime/errmsg.h
index dfa70c00..3f511ae5 100644
--- a/runtime/errmsg.h
+++ b/runtime/errmsg.h
@@ -34,7 +34,7 @@ typedef struct errmsg_s {
/* interfaces */
BEGINinterface(errmsg) /* name must also be changed in ENDinterface macro! */
- void __attribute__((format(printf, 3, 4))) (*LogError)(int iErrno, int iErrCode, char *pszErrFmt, ... );
+ void __attribute__((format(printf, 3, 4))) (*LogError)(const int iErrno, const int iErrCode, const char *pszErrFmt, ... );
ENDinterface(errmsg)
#define errmsgCURR_IF_VERSION 1 /* increment whenever you change the interface structure! */
diff --git a/runtime/rsyslog.c b/runtime/rsyslog.c
index 53c7855a..6523ae6d 100644
--- a/runtime/rsyslog.c
+++ b/runtime/rsyslog.c
@@ -86,11 +86,11 @@ int default_thr_sched_policy;
#endif
/* forward definitions */
-static rsRetVal dfltErrLogger(int, uchar *errMsg);
+static rsRetVal dfltErrLogger(const int, const uchar *errMsg);
/* globally visible static data - see comment in rsyslog.h for details */
uchar *glblModPath; /* module load path */
-rsRetVal (*glblErrLogger)(int, uchar*) = dfltErrLogger; /* the error logger to use by the errmsg module */
+rsRetVal (*glblErrLogger)(const int, const uchar*) = dfltErrLogger; /* the error logger to use by the errmsg module */
/* static data */
static int iRefCount = 0; /* our refcount - it MUST exist only once inside a process (not thread)
@@ -102,7 +102,7 @@ static int iRefCount = 0; /* our refcount - it MUST exist only once inside a pro
* default so that we can log errors during the intial phase, most importantly
* during initialization. -- rgerhards. 2008-04-17
*/
-static rsRetVal dfltErrLogger(int iErr, uchar *errMsg)
+static rsRetVal dfltErrLogger(const int iErr, const uchar *errMsg)
{
DEFiRet;
fprintf(stderr, "rsyslog runtime error(%d): %s\n", iErr, errMsg);
@@ -114,7 +114,7 @@ static rsRetVal dfltErrLogger(int iErr, uchar *errMsg)
* rgerhards, 2008-04-18
*/
rsRetVal
-rsrtSetErrLogger(rsRetVal (*errLogger)(int, uchar*))
+rsrtSetErrLogger(rsRetVal (*errLogger)(int, const uchar*))
{
DEFiRet;
assert(errLogger != NULL);
diff --git a/runtime/rsyslog.h b/runtime/rsyslog.h
index bf1c35bf..10e91215 100644
--- a/runtime/rsyslog.h
+++ b/runtime/rsyslog.h
@@ -505,13 +505,13 @@ void dbgprintf(char *, ...) __attribute__((format(printf, 1, 2)));
* add them. -- rgerhards, 2008-04-17
*/
extern uchar *glblModPath; /* module load path */
-extern rsRetVal (*glblErrLogger)(int, uchar*);
+extern rsRetVal (*glblErrLogger)(int, const uchar*);
/* some runtime prototypes */
rsRetVal rsrtInit(char **ppErrObj, obj_if_t *pObjIF);
rsRetVal rsrtExit(void);
int rsrtIsInit(void);
-rsRetVal rsrtSetErrLogger(rsRetVal (*errLogger)(int, uchar*));
+rsRetVal rsrtSetErrLogger(rsRetVal (*errLogger)(int, const uchar*));
/* this define below is (later) intended to be used to implement empty
* structs. TODO: check if compilers supports this and, if not, define
diff --git a/tools/syslogd.c b/tools/syslogd.c
index aaeb9866..cbc1d74b 100644
--- a/tools/syslogd.c
+++ b/tools/syslogd.c
@@ -418,7 +418,7 @@ finalize_it:
* message handler. -- rgerhards, 2008-04-17
*/
rsRetVal
-submitErrMsg(int iErr, uchar *msg)
+submitErrMsg(const int iErr, const uchar *msg)
{
DEFiRet;
iRet = logmsgInternal(iErr, LOG_SYSLOG|LOG_ERR, msg, 0);
@@ -436,7 +436,7 @@ submitMsgWithDfltRatelimiter(msg_t *pMsg)
* to log a message orginating from the syslogd itself.
*/
rsRetVal
-logmsgInternal(int iErr, int pri, uchar *msg, int flags)
+logmsgInternal(const int iErr, const int pri, const uchar *msg, int flags)
{
uchar pszTag[33];
msg_t *pMsg;
@@ -484,7 +484,6 @@ logmsgInternal(int iErr, int pri, uchar *msg, int flags)
* message to the queue engine.
*/
ratelimitAddMsg(internalMsg_ratelimiter, NULL, pMsg);
- //submitMsgWithDfltRatelimiter(pMsg);
}
finalize_it:
RETiRet;