comparison libfdproto/messages.c @ 704:289632905e19

Added new sanity check
author Sebastien Decugis <sdecugis@nict.go.jp>
date Tue, 25 Jan 2011 16:34:27 +0900
parents a29e4201d511
children 4ffbc9f1e922
comparison
equal deleted inserted replaced
703:b1d7d7cad733 704:289632905e19
132 #define GETMSGHDRSZ() 20 132 #define GETMSGHDRSZ() 20
133 133
134 /* Macro to cast a msg_avp_t */ 134 /* Macro to cast a msg_avp_t */
135 #define _M(_x) ((struct msg *)(_x)) 135 #define _M(_x) ((struct msg *)(_x))
136 /* Check the type and eyecatcher */ 136 /* Check the type and eyecatcher */
137 #define CHECK_MSG(_x) ((_C(_x)->type == MSG_MSG) && (_M(_x)->msg_eyec == MSG_MSG_EYEC)) 137 #define CHECK_MSG(_x) ((_x) && (_C(_x)->type == MSG_MSG) && (_M(_x)->msg_eyec == MSG_MSG_EYEC))
138 138
139 #define VALIDATE_OBJ(_x) ( (CHECK_MSG(_x)) || (CHECK_AVP(_x)) ) 139 #define VALIDATE_OBJ(_x) ( (CHECK_MSG(_x)) || (CHECK_AVP(_x)) )
140 140
141 141
142 /* Macro to validate a MSGFL_ value */ 142 /* Macro to validate a MSGFL_ value */
"Welcome to our mercurial repository"