summaryrefslogtreecommitdiffstats
path: root/obj.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-01-11 14:12:25 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-01-11 14:12:25 +0000
commit8dad3997505f71e6e9962892f79d7b7dad0a89ce (patch)
treece49da850c9d4deaf6143ef2232766e8c1ccdd35 /obj.h
parente095d1ab45b205b4849151b15592c2824f04373a (diff)
downloadrsyslog-8dad3997505f71e6e9962892f79d7b7dad0a89ce.tar.gz
rsyslog-8dad3997505f71e6e9962892f79d7b7dad0a89ce.tar.xz
rsyslog-8dad3997505f71e6e9962892f79d7b7dad0a89ce.zip
file stream objects are now persistet on immediate queue shutdown (queue
itself is not yet fully persisted)
Diffstat (limited to 'obj.h')
-rw-r--r--obj.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/obj.h b/obj.h
index 31a08004..ae395a53 100644
--- a/obj.h
+++ b/obj.h
@@ -69,8 +69,14 @@
#define objGetName(pThis) (((obj_t*) (pThis))->pObjInfo->pszName)
#define objGetObjID(pThis) (((obj_t*) (pThis))->pObjInfo->objID)
#define objGetVersion(pThis) (((obj_t*) (pThis))->pObjInfo->iObjVers)
-/* must be called in Constructor: */
-#define objConstructSetObjInfo(pThis) ((obj_t*) (pThis))->pObjInfo = pObjInfoOBJ;
+/* the next macro MUST be called in Constructors: */
+#ifndef NDEBUG /* this means if debug... */
+# define objConstructSetObjInfo(pThis) \
+ ((obj_t*) (pThis))->pObjInfo = pObjInfoOBJ; \
+ ((obj_t*) (pThis))->iObjCooCKiE = 0xBADEFEE
+#else
+# define objConstructSetObjInfo(pThis) ((obj_t*) (pThis))->pObjInfo = pObjInfoOBJ
+#endif
#define objDestruct(pThis) (((obj_t*) (pThis))->pObjInfo->objMethods[objMethod_DESTRUCT])(pThis)
#define objSerialize(pThis) (((obj_t*) (pThis))->pObjInfo->objMethods[objMethod_SERIALIZE])