Changeset 330:e283e18b2673 in freeDiameter
- Timestamp:
- May 31, 2010, 10:33:59 AM (13 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libfreeDiameter/messages.c
r291 r330 2212 2212 /* For unknown AVP, we don't have a callback registered, so just skip */ 2213 2213 if (avp->avp_model) { 2214 struct dict_object * type, * enumval; 2215 2216 /* Sanity */ 2217 ASSERT( avp->avp_public.avp_value ); 2218 2214 struct dict_object * enumval = NULL; 2215 2219 2216 /* Get the list of callback for this AVP */ 2220 2217 CHECK_FCT_DO( ret = fd_dict_disp_cb(DICT_AVP, avp->avp_model, &cb_list), goto error ); 2221 2218 2222 /* Check if the AVP has a constant value */ 2223 CHECK_FCT_DO( ret = fd_dict_search(dict, DICT_TYPE, TYPE_OF_AVP, avp->avp_model, &type, 0), goto error ); 2224 if (type) { 2225 struct dict_enumval_request req; 2226 memset(&req, 0, sizeof(struct dict_enumval_request)); 2227 req.type_obj = type; 2228 memcpy( &req.search.enum_value, avp->avp_public.avp_value, sizeof(union avp_value) ); 2229 CHECK_FCT_DO( ret = fd_dict_search(dict, DICT_ENUMVAL, ENUMVAL_BY_STRUCT, &req, &enumval, 0), goto error ); 2230 } else { 2231 /* No enumerated value in this case */ 2232 enumval = NULL; 2219 /* We search enumerated values only in case of non-grouped AVP */ 2220 if ( avp->avp_public.avp_value ) { 2221 struct dict_object * type; 2222 /* Check if the AVP has a constant value */ 2223 CHECK_FCT_DO( ret = fd_dict_search(dict, DICT_TYPE, TYPE_OF_AVP, avp->avp_model, &type, 0), goto error ); 2224 if (type) { 2225 struct dict_enumval_request req; 2226 memset(&req, 0, sizeof(struct dict_enumval_request)); 2227 req.type_obj = type; 2228 memcpy( &req.search.enum_value, avp->avp_public.avp_value, sizeof(union avp_value) ); 2229 CHECK_FCT_DO( ret = fd_dict_search(dict, DICT_ENUMVAL, ENUMVAL_BY_STRUCT, &req, &enumval, 0), goto error ); 2230 } 2233 2231 } 2234 2232
Note: See TracChangeset
for help on using the changeset viewer.