Navigation


Changeset 330:e283e18b2673 in freeDiameter


Ignore:
Timestamp:
May 31, 2010, 10:33:59 AM (14 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Removed incorrect ASSERT -- thanks to Alexandre for the bug finding.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libfreeDiameter/messages.c

    r291 r330  
    22122212                /* For unknown AVP, we don't have a callback registered, so just skip */
    22132213                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                       
    22192216                        /* Get the list of callback for this AVP */
    22202217                        CHECK_FCT_DO( ret = fd_dict_disp_cb(DICT_AVP, avp->avp_model, &cb_list), goto error );
    22212218                       
    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                                }
    22332231                        }
    22342232                       
Note: See TracChangeset for help on using the changeset viewer.