Changeset 891:9432ac55823c in freeDiameter for libfdcore
- Timestamp:
- Nov 18, 2012, 7:28:50 AM (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 */
Note: See TracChangeset
for help on using the changeset viewer.