Navigation


Changeset 738:d666051658bd in freeDiameter for libfdcore/routing_dispatch.c


Ignore:
Timestamp:
Mar 2, 2011, 6:21:59 PM (13 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Fix broken 'almostcasecmp' logic

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libfdcore/routing_dispatch.c

    r717 r738  
    274274               
    275275                /* In the AVPs, the value comes from the network, so let's be case permissive */
    276                 if (dh && !fd_os_almostcasecmp(dh->os.data, dh->os.len, c->diamid, c->diamidlen) ) {
     276                if (dh && !fd_os_almostcasesrch(dh->os.data, dh->os.len, c->diamid, c->diamidlen, NULL) ) {
    277277                        /* The candidate is the Destination-Host */
    278278                        c->score += FD_SCORE_FINALDEST;
    279279                } else {
    280                         if (dr && !fd_os_almostcasecmp(dr->os.data, dr->os.len, c->realm, c->realmlen) ) {
     280                        if (dr && !fd_os_almostcasesrch(dr->os.data, dr->os.len, c->realm, c->realmlen, NULL) ) {
    281281                                /* The candidate's realm matchs the Destination-Realm */
    282282                                c->score += FD_SCORE_REALM;
     
    592592                                                ASSERT( ahdr->avp_value );
    593593                                                /* Compare the Destination-Host AVP of the message with our identity */
    594                                                 if (!fd_os_almostcasecmp(ahdr->avp_value->os.data, ahdr->avp_value->os.len, fd_g_config->cnf_diamid, fd_g_config->cnf_diamid_len)) {
     594                                                if (!fd_os_almostcasesrch(ahdr->avp_value->os.data, ahdr->avp_value->os.len, fd_g_config->cnf_diamid, fd_g_config->cnf_diamid_len, NULL)) {
    595595                                                        is_dest_host = YES;
    596596                                                } else {
     
    613613                                                dr_val = ahdr->avp_value;
    614614                                                /* Compare the Destination-Realm AVP of the message with our identity */
    615                                                 if (!fd_os_almostcasecmp(dr_val->os.data, dr_val->os.len, fd_g_config->cnf_diamrlm, fd_g_config->cnf_diamrlm_len)) {
     615                                                if (!fd_os_almostcasesrch(dr_val->os.data, dr_val->os.len, fd_g_config->cnf_diamrlm, fd_g_config->cnf_diamrlm_len, NULL)) {
    616616                                                        is_dest_realm = YES;
    617617                                                } else {
Note: See TracChangeset for help on using the changeset viewer.