Changeset 1313


Ignore:
Timestamp:
May 29, 2007 4:09:51 AM (12 years ago)
Author:
bennylp
Message:

Fixed ticket #307: Fail to parse fully qualified PIDF document (thanks Cool_Zer0)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip-simple/pidf.c

    r1241 r1313  
    344344{ 
    345345    pjpidf_pres *pres = pj_xml_parse(pool, text, len); 
    346     if (pres) { 
    347         if (pj_stricmp(&pres->name, &PRESENCE) != 0) 
    348             return NULL; 
    349     } 
    350     return pres; 
     346    if (pres && pres->name.slen >= 8) { 
     347        pj_str_t name; 
     348 
     349        name.ptr = pres->name.ptr + (pres->name.slen - 8); 
     350        name.slen = 8; 
     351 
     352        if (pj_stricmp(&name, &PRESENCE) == 0) 
     353            return pres; 
     354    } 
     355    return NULL; 
    351356} 
    352357 
Note: See TracChangeset for help on using the changeset viewer.