Ignore:
Timestamp:
Feb 19, 2006 3:37:19 PM (18 years ago)
Author:
bennylp
Message:

SIMPLE test with FWD, and added more info in UI

File:
1 edited

Legend:

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

    r197 r201  
    3030static pj_str_t ATOM = { "atom", 4 }; 
    3131static pj_str_t ATOMID = { "atomid", 6 }; 
     32static pj_str_t ID = { "id", 2 }; 
    3233static pj_str_t ADDRESS = { "address", 7 }; 
    3334static pj_str_t SUBSCRIBE_PARAM = { ";method=SUBSCRIBE", 17 }; 
     
    127128    if (pj_stricmp(&pres->name, &PRESENCE) != 0) 
    128129        return NULL; 
    129     if (pj_xml_find_attr(pres, &URI, NULL) == NULL) 
    130         return NULL; 
    131130 
    132131    /* Validate <presentity> */ 
     
    134133    if (node == NULL) 
    135134        return NULL; 
     135    if (pj_xml_find_attr(node, &URI, NULL) == NULL) 
     136        return NULL; 
    136137 
    137138    /* Validate <atom> */ 
     
    139140    if (node == NULL) 
    140141        return NULL; 
    141     if (pj_xml_find_attr(node, &ATOMID, NULL) == NULL) 
    142         return NULL; 
     142    if (pj_xml_find_attr(node, &ATOMID, NULL) == NULL &&  
     143        pj_xml_find_attr(node, &ID, NULL) == NULL) 
     144    { 
     145        return NULL; 
     146    } 
    143147 
    144148    /* Address */ 
     
    247251        return PJ_FALSE; 
    248252    } 
    249     status = pj_xml_find_node(atom, &STATUS); 
     253    status = pj_xml_find_node(addr, &STATUS); 
    250254    if (!status) { 
    251255        pj_assert(0); 
     
    258262    } 
    259263 
    260     return pj_stricmp(&attr->value, &OPEN) ? PJ_TRUE : PJ_FALSE; 
     264    return pj_stricmp(&attr->value, &OPEN)==0 ? PJ_TRUE : PJ_FALSE; 
    261265} 
    262266 
Note: See TracChangeset for help on using the changeset viewer.