Changeset 201 for pjproject/trunk/pjsip/src/pjsip-simple/xpidf.c
- Timestamp:
- Feb 19, 2006 3:37:19 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip-simple/xpidf.c
r197 r201 30 30 static pj_str_t ATOM = { "atom", 4 }; 31 31 static pj_str_t ATOMID = { "atomid", 6 }; 32 static pj_str_t ID = { "id", 2 }; 32 33 static pj_str_t ADDRESS = { "address", 7 }; 33 34 static pj_str_t SUBSCRIBE_PARAM = { ";method=SUBSCRIBE", 17 }; … … 127 128 if (pj_stricmp(&pres->name, &PRESENCE) != 0) 128 129 return NULL; 129 if (pj_xml_find_attr(pres, &URI, NULL) == NULL)130 return NULL;131 130 132 131 /* Validate <presentity> */ … … 134 133 if (node == NULL) 135 134 return NULL; 135 if (pj_xml_find_attr(node, &URI, NULL) == NULL) 136 return NULL; 136 137 137 138 /* Validate <atom> */ … … 139 140 if (node == NULL) 140 141 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 } 143 147 144 148 /* Address */ … … 247 251 return PJ_FALSE; 248 252 } 249 status = pj_xml_find_node(a tom, &STATUS);253 status = pj_xml_find_node(addr, &STATUS); 250 254 if (!status) { 251 255 pj_assert(0); … … 258 262 } 259 263 260 return pj_stricmp(&attr->value, &OPEN) ? PJ_TRUE : PJ_FALSE;264 return pj_stricmp(&attr->value, &OPEN)==0 ? PJ_TRUE : PJ_FALSE; 261 265 } 262 266
Note: See TracChangeset
for help on using the changeset viewer.