Changeset 713 for pjproject/trunk


Ignore:
Timestamp:
Sep 13, 2006 10:48:37 PM (18 years ago)
Author:
bennylp
Message:

SIP methods are now compared case-sensitively (previously it was case-insensitive) because the standard says so. There's no ill effect of the old behavior, but it's still important that we do things according to what the standard says.

Also a little change in string implementation (use memcmp() instead of strncmp()), an increase the version number from 0.5.7.6 to 0.5.7.7.

Location:
pjproject/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/include/pj/string_i.h

    r354 r713  
    142142        return diff > 0 ? 1 : -1; 
    143143    } else if (str1->ptr && str1->slen) { 
    144         return pj_ansi_strncmp(str1->ptr, str2->ptr, str1->slen); 
     144        return memcmp(str1->ptr, str2->ptr, str1->slen); 
    145145    } else { 
    146146        return 0; 
     
    152152{ 
    153153    if (str1->ptr && str2->ptr) 
    154         return pj_ansi_strncmp(str1->ptr, str2->ptr, len); 
     154        return memcmp(str1->ptr, str2->ptr, len); 
    155155    else if (str2->ptr) 
    156156        return str2->slen==0 ? 0 : -1; 
     
    167167        return 0; 
    168168    else if (str1->ptr && str2) 
    169         return pj_ansi_strncmp(str1->ptr, str2, len); 
     169        return memcmp(str1->ptr, str2, len); 
    170170    else if (str1->ptr) 
    171171        return str1->slen==0 ? 0 : 1; 
  • pjproject/trunk/pjlib/src/pj/config.c

    r685 r713  
    2222 
    2323static const char *id = "config.c"; 
    24 const char *PJ_VERSION = "0.5.7.6"; 
     24const char *PJ_VERSION = "0.5.7.7"; 
    2525 
    2626PJ_DEF(void) pj_dump_config(void) 
  • pjproject/trunk/pjsip/src/pjsip/sip_msg.c

    r606 r713  
    227227        if (m1->id != PJSIP_OTHER_METHOD) 
    228228            return 0; 
    229         return pj_stricmp(&m1->name, &m2->name); 
     229        /* Method comparison is case sensitive! */ 
     230        return pj_strcmp(&m1->name, &m2->name); 
    230231    } 
    231232     
Note: See TracChangeset for help on using the changeset viewer.