# HG changeset patch # User Sebastien Decugis # Date 1245825660 -32400 # Node ID 3b6cab85490f0d40b6ff76942d1f84c64790fcda # Parent 89e0afe61a529a264f8a801feb191491bb3156e9 Fixed some warnings diff -r 89e0afe61a52 -r 3b6cab85490f extensions/radius_gw/rgw_msg.c --- 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"); diff -r 89e0afe61a52 -r 3b6cab85490f extensions/radius_gw/rgw_work.c --- 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) {