Changeset 4296 for pjproject


Ignore:
Timestamp:
Nov 7, 2012 4:56:26 AM (12 years ago)
Author:
nanang
Message:

Re #1556: Fixed hash key case insensitive comparison. This is reported to cause CANCEL request will be responded with 481 (Transaction does not exist) when the Via branch is not started with magic cookie (old SIP RFC), thanks Marcus Froeschl for the report.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/hash.c

    r4208 r4296  
    179179         p_entry = &entry->next, entry = *p_entry) 
    180180    { 
    181         pj_str_t str; 
    182          
    183         if (lower) { 
    184             str.ptr = (char *)entry->key; 
    185             str.slen = keylen; 
    186         } 
    187181        if (entry->hash==hash && entry->keylen==keylen && 
    188             ((lower && pj_strnicmp2(&str, (const char *)key, keylen)==0) || 
     182            ((lower && pj_ansi_strnicmp((const char*)entry->key, 
     183                                        (const char*)key, keylen)==0) || 
    189184             (!lower && pj_memcmp(entry->key, key, keylen)==0))) 
    190185        { 
    191             break;       
     186            break; 
    192187        } 
    193188    } 
Note: See TracChangeset for help on using the changeset viewer.