Ignore:
Timestamp:
Apr 15, 2007 10:09:35 AM (17 years ago)
Author:
bennylp
Message:

Fixed ticket #224: Bug in pjmedia_sdp_attr_find (thanks Geoff Talbot)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/pjproject-0.5-stable/pjmedia/src/pjmedia/sdp.c

    r974 r1195  
    139139{ 
    140140    unsigned i; 
     141    unsigned c_pt = 0xFFFF; 
     142 
     143    if (c_fmt) 
     144        c_pt = pj_strtoul(c_fmt); 
    141145 
    142146    for (i=0; i<count; ++i) { 
     
    144148            const pjmedia_sdp_attr *a = attr_array[i]; 
    145149            if (c_fmt) { 
    146                 if (a->value.slen > c_fmt->slen && 
    147                     pj_strncmp(&a->value, c_fmt, c_fmt->slen)==0) 
    148                 { 
     150                unsigned pt = (unsigned) pj_strtoul2(&a->value, NULL, 10); 
     151                if (pt == c_pt) { 
    149152                    return (pjmedia_sdp_attr*)a; 
    150153                } 
Note: See TracChangeset for help on using the changeset viewer.