From 1ea869ec5460806841ab4feacf24e25c288a5760 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 29 Nov 2013 09:16:03 +0100 Subject: use const keyword at (some) appropriate places --- runtime/errmsg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/errmsg.h') 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! */ -- cgit v1.2.3 From 89060ecec2db9799af3d5eb17a174b9a0f2bd4b2 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 29 Nov 2013 09:44:58 +0100 Subject: introduce new function to emit warning and other non-error messages also refactor the error message subsystem a bit --- runtime/errmsg.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'runtime/errmsg.h') diff --git a/runtime/errmsg.h b/runtime/errmsg.h index 3f511ae5..730e8f82 100644 --- a/runtime/errmsg.h +++ b/runtime/errmsg.h @@ -23,7 +23,6 @@ #include "errmsg.h" -/* TODO: define error codes */ #define NO_ERRCODE -1 /* the errmsg object */ @@ -35,8 +34,10 @@ typedef struct errmsg_s { /* interfaces */ BEGINinterface(errmsg) /* name must also be changed in ENDinterface macro! */ void __attribute__((format(printf, 3, 4))) (*LogError)(const int iErrno, const int iErrCode, const char *pszErrFmt, ... ); + /* v2, 2013-11-29 */ + void __attribute__((format(printf, 4, 5))) (*LogMsg)(const int iErrno, const int iErrCode, const int severity, const char *pszErrFmt, ... ); ENDinterface(errmsg) -#define errmsgCURR_IF_VERSION 1 /* increment whenever you change the interface structure! */ +#define errmsgCURR_IF_VERSION 2 /* increment whenever you change the interface structure! */ /* prototypes */ -- cgit v1.2.3 From a42da69a72699081a2e75c737137c7a49c0fe893 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 29 Nov 2013 09:49:42 +0100 Subject: nit: update copyright dates --- runtime/errmsg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/errmsg.h') diff --git a/runtime/errmsg.h b/runtime/errmsg.h index 730e8f82..b1b4741f 100644 --- a/runtime/errmsg.h +++ b/runtime/errmsg.h @@ -1,6 +1,6 @@ /* The errmsg object. It is used to emit error message inside rsyslog. * - * Copyright 2008-2012 Rainer Gerhards and Adiscon GmbH. + * Copyright 2008-2013 Rainer Gerhards and Adiscon GmbH. * * This file is part of the rsyslog runtime library. * -- cgit v1.2.3