summaryrefslogtreecommitdiffstats
path: root/obj-types.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-01-25 19:25:46 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-01-25 19:25:46 +0000
commit87f0e9b5f91407418a43a06f39831febfbd4e3ad (patch)
tree810a4191b8cfd14a4a2a19399dbe894b16b5e6ae /obj-types.h
parent167abdb5b3fa6900edd6bbdb1cc7d586896a268c (diff)
downloadrsyslog-87f0e9b5f91407418a43a06f39831febfbd4e3ad.tar.gz
rsyslog-87f0e9b5f91407418a43a06f39831febfbd4e3ad.tar.xz
rsyslog-87f0e9b5f91407418a43a06f39831febfbd4e3ad.zip
disk-assisted queue mode finally begins to look good ;)
Diffstat (limited to 'obj-types.h')
-rw-r--r--obj-types.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/obj-types.h b/obj-types.h
index 7eff503d..1e607d0c 100644
--- a/obj-types.h
+++ b/obj-types.h
@@ -100,16 +100,21 @@ typedef struct obj { /* the dummy struct that each derived class can be casted t
objInfo_t *pObjInfo; \
unsigned int iObjCooCKiE; /* prevent name conflict, thus the strange name */
# define ISOBJ_assert(pObj) \
- { \
+ do { \
+ if(pObj == NULL) dbgPrintAllDebugInfo(); \
assert((pObj) != NULL); \
+ if(((obj_t*)(pObj))->iObjCooCKiE != (unsigned) 0xBADEFEE) dbgPrintAllDebugInfo(); \
assert((unsigned) ((obj_t*)(pObj))->iObjCooCKiE == (unsigned) 0xBADEFEE); \
- }
+ } while(0);
# define ISOBJ_TYPE_assert(pObj, objType) \
- { \
+ do { \
+ if(pObj == NULL) dbgPrintAllDebugInfo(); \
assert(pObj != NULL); \
+ if(((obj_t*)(pObj))->iObjCooCKiE != (unsigned) 0xBADEFEE) dbgPrintAllDebugInfo(); \
assert((unsigned) pObj->iObjCooCKiE == (unsigned) 0xBADEFEE); \
+ if(objGetObjID(pObj) != OBJ##objType) dbgPrintAllDebugInfo(); \
assert(objGetObjID(pObj) == OBJ##objType); \
- }
+ } while(0);
#else /* non-debug mode, no checks but much faster */
# define BEGINobjInstance objInfo_t *pObjInfo;
# define ISOBJ_TYPE_assert(pObj, objType)