Navigation


Changeset 602:0b5d21c87855 in freeDiameter for libfreeDiameter/dictionary.c


Ignore:
Timestamp:
Nov 25, 2010, 4:27:54 PM (13 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Added new AVP search criteria in the dictionary: AVP_BY_NAME_ALL_VENDORS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libfreeDiameter/dictionary.c

    r446 r602  
    592592        struct fd_list * __li;                                                  \
    593593        ret = 0;                                                                \
    594         for  (__li = (sentinel); __li->next != (sentinel); __li = __li->next) { \
    595                 __cmp = strcmp(__str, _O(__li->next->o)->data. datafield );     \
     594        for  (__li = (sentinel)->next; __li != (sentinel); __li = __li->next) { \
     595                __cmp = strcmp(__str, _O(__li->o)->data. datafield );           \
    596596                if (__cmp == 0) {                                               \
    597597                        if (result)                                             \
    598                                 *result = _O(__li->next->o);                    \
     598                                *result = _O(__li->o);                          \
    599599                        goto end;                                               \
    600600                }                                                               \
     
    974974                        break;
    975975               
     976                case AVP_BY_NAME_ALL_VENDORS:
     977                        {
     978                                struct fd_list * li;
     979                               
     980                                /* First, search for vendor 0 */
     981                                SEARCH_string( what, &dict->dict_vendors.list[2], avp.avp_name, 1);
     982                               
     983                                /* If not found, loop for all vendors, until found */
     984                                for (li = dict->dict_vendors.list[0].next; li != &dict->dict_vendors.list[0]; li = li->next) {
     985                                        SEARCH_string( what, &_O(li->o)->list[2], avp.avp_name, 1);
     986                                }
     987                        }
     988                        break;
     989               
    976990                default:
    977991                        /* Invalid criteria */
Note: See TracChangeset for help on using the changeset viewer.