summaryrefslogtreecommitdiffstats
path: root/runtime/obj-types.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-04-24 09:57:43 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-04-24 09:57:43 +0200
commitbf3d2c1b392af1383a3cdc247f2280fd31a12699 (patch)
tree532f3de6ec3b7fc7557c4e3a60f142a07a29580a /runtime/obj-types.h
parent721b9ee252143d182c3c145380e5dbec8c3b0102 (diff)
downloadrsyslog-bf3d2c1b392af1383a3cdc247f2280fd31a12699.tar.gz
rsyslog-bf3d2c1b392af1383a3cdc247f2280fd31a12699.tar.xz
rsyslog-bf3d2c1b392af1383a3cdc247f2280fd31a12699.zip
message reception via TCP work again
... at least in some cases ;) I assume there are still a couple of bugs inside the code. But at least we have something from where we can continue to work on.
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)