summaryrefslogtreecommitdiffstats
path: root/rsyslog.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-07-31 08:40:32 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-07-31 08:40:32 +0000
commitc0b2b6b1bf3735bb0570523c9529bb1f93e96b86 (patch)
tree10c28775f661259666da1f7b76cdbe74dd5b7000 /rsyslog.h
parent9c20d0b4b4d3b85128d1754af3324866b135a412 (diff)
downloadrsyslog-c0b2b6b1bf3735bb0570523c9529bb1f93e96b86.tar.gz
rsyslog-c0b2b6b1bf3735bb0570523c9529bb1f93e96b86.tar.xz
rsyslog-c0b2b6b1bf3735bb0570523c9529bb1f93e96b86.zip
- added macro to abort a function and go to finalizer
- added output of config file line number when a parsing error occured
Diffstat (limited to 'rsyslog.h')
-rw-r--r--rsyslog.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/rsyslog.h b/rsyslog.h
index 4a379cd9..6a9f9500 100644
--- a/rsyslog.h
+++ b/rsyslog.h
@@ -61,7 +61,8 @@ enum rsRetVal_ /** return value. All methods return this if not specified oth
RS_RET_RQD_TPLOPT_MISSING = -2008,/**< a required template option is missing */
RS_RET_INVALID_VALUE = -2009,/**< some value is invalid (e.g. user-supplied data) */
RS_RET_INVALID_INT = -2010,/**< invalid integer */
- RS_RET_VAL_OUT_OF_RANGE = -2011, /**< value out of range */
+ RS_RET_INVALID_CMD = -2011,/**< invalid command */
+ RS_RET_VAL_OUT_OF_RANGE = -2012, /**< value out of range */
RS_RET_OK = 0 /**< operation successful */
};
typedef enum rsRetVal_ rsRetVal; /**< friendly type for global return value */
@@ -72,6 +73,9 @@ typedef enum rsRetVal_ rsRetVal; /**< friendly type for global return value */
*/
#define CHKiRet(code) if((iRet = code) != RS_RET_OK) goto finalize_it
#define DEFiRet rsRetVal iRet = RS_RET_OK
+#define ABORT_FINALIZE(errCode) \
+ iRet = errCode;\
+ goto finalize_it;
/** Object ID. These are for internal checking. Each
* object is assigned a specific ID. This is contained in