changeset 425:3b6cab85490f

Fixed some warnings
author Sebastien Decugis <sdecugis@nict.go.jp>
date Wed, 24 Jun 2009 15:41:00 +0900
parents 89e0afe61a52
children 4349b77ad989
files extensions/radius_gw/rgw_msg.c extensions/radius_gw/rgw_work.c
diffstat 2 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/extensions/radius_gw/rgw_msg.c	Wed Jun 24 14:51:27 2009 +0900
+++ b/extensions/radius_gw/rgw_msg.c	Wed Jun 24 15:41:00 2009 +0900
@@ -133,7 +133,7 @@
 			auth[12], auth[13], auth[14], auth[15]);
 	for (i = 0; i < msg->radius.attr_used; i++) {
 		struct radius_attr_hdr *attr = (struct radius_attr_hdr *)(msg->radius.buf + msg->radius.attr_pos[i]);
-		log_debug("    - len:%3hhd, type:0x%02hhx (%s)\n", attr->length, attr->type, rgw_msg_attrtype_str(attr->type));
+		log_debug("    - len:%3hhu, type:0x%02hhx (%s)\n", attr->length, attr->type, rgw_msg_attrtype_str(attr->type));
 		/* If we need to dump the value, it's better to call directly radius_msg_dump instead... */
 	}
 	log_debug("-----------------------------\n");
--- a/extensions/radius_gw/rgw_work.c	Wed Jun 24 14:51:27 2009 +0900
+++ b/extensions/radius_gw/rgw_work.c	Wed Jun 24 15:41:00 2009 +0900
@@ -80,14 +80,14 @@
 	CHECK_FCT_DO( rgw_extensions_loop_ans(pa->rad, pa->sess, ans, &rad_ans, pa->cli), goto out );
 	
 	/* Now check what AVPs remain in the diameter answer. If AVPs with the 'M' flag are here, we have a problem... */
-	CHECK_FCT( msg_browse(*ans, MSG_BRW_FIRST_CHILD, &avp, NULL) );
+	CHECK_FCT_DO( msg_browse(*ans, MSG_BRW_FIRST_CHILD, &avp, NULL), { avp = NULL; pb++; } );
 	while (avp) {
-		CHECK_FCT( msg_avp_data ( avp, &adata ) );
-		TRACE_DEBUG(ANNOYING, "Remaining AVP code %d", adata->avp_code);
+		CHECK_FCT_DO( msg_avp_data ( avp, &adata ), { pb++; continue; } );
 		if (adata->avp_flags & AVP_FLAG_MANDATORY) {
+			TRACE_DEBUG(FULL, "Remaining Mandatory AVP code %d", adata->avp_code);
 			pb++;
 		}
-		CHECK_FCT( msg_browse(avp, MSG_BRW_NEXT, &avp, NULL) );
+		CHECK_FCT_DO( msg_browse(avp, MSG_BRW_NEXT, &avp, NULL), { pb++; break; } );
 	}
 	
 	if (pb) {
"Welcome to our mercurial repository"