Changeset 891:9432ac55823c in freeDiameter
- Timestamp:
- Nov 18, 2012, 7:28:50 AM (11 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
include/freeDiameter/libfdproto.h
r871 r891 2524 2524 struct fd_pei { 2525 2525 char * pei_errcode; /* name of the error code to use */ 2526 struct avp * pei_avp; /* pointer to invalid or missing AVP (to be freed) */2526 struct avp * pei_avp; /* pointer to invalid (in original message) or missing AVP (to be freed) */ 2527 2527 char * pei_message; /* Overwrite default message if needed */ 2528 2528 int pei_protoerr; /* do we set the 'E' bit in the error message ? */ -
libfdcore/messages.c
r837 r891 234 234 /* Now add the optavp in a FailedAVP if provided */ 235 235 if (optavp) { 236 struct avp * optavp_cpy = NULL; 237 struct avp_hdr *opt_hdr, *optcpy_hdr; 238 236 239 /* Create the Failed-AVP AVP */ 237 240 CHECK_FCT( fd_msg_avp_new( dict_avp_FAVP, 0, &avp_FAVP ) ); 238 241 242 /* Create a new AVP with a copy of the data of the invalid or missing AVP */ 243 CHECK_FCT( fd_msg_avp_new( NULL, AVPFL_SET_BLANK_VALUE, &optavp_cpy) ); 244 245 CHECK_FCT( fd_msg_avp_hdr(optavp, &opt_hdr) ); 246 CHECK_FCT( fd_msg_avp_hdr(optavp_cpy, &optcpy_hdr) ); 247 memcpy(optcpy_hdr, opt_hdr, sizeof(struct avp_hdr)); 248 239 249 /* Add the passed AVP inside it */ 240 CHECK_FCT( fd_msg_avp_add( avp_FAVP, MSG_BRW_LAST_CHILD, optavp ) );250 CHECK_FCT( fd_msg_avp_add( avp_FAVP, MSG_BRW_LAST_CHILD, optavp_cpy ) ); 241 251 242 252 /* And add to the message */ -
libfdproto/messages.c
r889 r891 1779 1779 error_info->pei_message = error_message; 1780 1780 } 1781 avp->avp_model = NULL; 1781 1782 return EBADMSG; 1782 1783 } -
tests/testmesg.c
r890 r891 767 767 CHECK( EBADMSG, fd_msg_parse_or_error( &msg ) ); 768 768 769 /* Check the Failed-AVP is as expected */769 TODO("Check the Failed-AVP is as expected"); 770 770 771 771 fd_msg_dump_walk(0, msg); … … 773 773 /* reset */ 774 774 CHECK( 0, fd_msg_free ( msg ) ); 775 776 ASSERT(0);777 775 } 778 776 #endif
Note: See TracChangeset
for help on using the changeset viewer.