summaryrefslogtreecommitdiffstats
path: root/runtime/obj-types.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-04-24 17:43:45 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-04-24 17:43:45 +0200
commit4b05bef636c11cbaf4d32097ed9656a1447ed3d0 (patch)
tree15c698fa86a85e5e3a1db1f14e2eaf6f11c6948f /runtime/obj-types.h
parent82095efa24ea0692a6747d4296f398ebd37e5339 (diff)
parenta7040a9623e228043209da897dbf30b9ab02d771 (diff)
downloadrsyslog-4b05bef636c11cbaf4d32097ed9656a1447ed3d0.tar.gz
rsyslog-4b05bef636c11cbaf4d32097ed9656a1447ed3d0.tar.bz2
rsyslog-4b05bef636c11cbaf4d32097ed9656a1447ed3d0.zip
Merge branch 'sock-abstract' into tls
Conflicts: runtime/Makefile.am runtime/netstrm.c runtime/nsd.h runtime/nsd_ptcp.c runtime/rsyslog.h
Diffstat (limited to 'runtime/obj-types.h')
-rw-r--r--runtime/obj-types.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/runtime/obj-types.h b/runtime/obj-types.h
index acdc757d..2d0e0f14 100644
--- a/runtime/obj-types.h
+++ b/runtime/obj-types.h
@@ -106,8 +106,12 @@ struct obj_s { /* the dummy struct that each derived class can be casted to */
do { \
ASSERT(pObj != NULL); \
ASSERT((unsigned) ((obj_t*) (pObj))->iObjCooCKiE == (unsigned) 0xBADEFEE); \
- ASSERT(!strcmp((char*)(((obj_t*)pObj)->pObjInfo->pszID), #objType)); \
- } while(0);
+ if(strcmp((char*)(((obj_t*)pObj)->pObjInfo->pszID), #objType)) { \
+ dbgprintf("ISOBJ assert failure: invalid object type, expected '%s' " \
+ "actual '%s'\n", #objType, (((obj_t*)pObj)->pObjInfo->pszID)); \
+ assert(0); /* trigger assertion, messge we already have */ \
+ } \
+ } while(0)
#else /* non-debug mode, no checks but much faster */
# define BEGINobjInstance obj_t objData
# define ISOBJ_TYPE_assert(pObj, objType)