mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-24 06:38:08 +00:00
fix pidfonline checking
This commit is contained in:
parent
32b7ce6db0
commit
9296483873
1 changed files with 4 additions and 1 deletions
|
|
@ -1229,6 +1229,7 @@ static int process_pidf_xml_presence_service_notes(xmlparsing_context_t *xml_ctx
|
|||
static int process_pidf_xml_presence_services(xmlparsing_context_t *xml_ctx, LinphonePresenceModel *model) {
|
||||
char xpath_str[MAX_XPATH_LENGTH];
|
||||
xmlXPathObjectPtr service_object;
|
||||
xmlXPathObjectPtr pidfonline_object;
|
||||
LinphonePresenceService *service;
|
||||
const char *basic_status_str;
|
||||
const char *service_id_str;
|
||||
|
|
@ -1256,7 +1257,9 @@ static int process_pidf_xml_presence_services(xmlparsing_context_t *xml_ctx, Lin
|
|||
}
|
||||
|
||||
snprintf(xpath_str, sizeof(xpath_str), "%s[%i]/pidf:status/pidfonline:online", service_prefix, i);
|
||||
if (linphone_get_xml_xpath_object_for_node_list(xml_ctx, xpath_str) != NULL) {
|
||||
if ((pidfonline_object = linphone_get_xml_xpath_object_for_node_list(xml_ctx, xpath_str)) != NULL
|
||||
&& pidfonline_object->nodesetval
|
||||
&& pidfonline_object->nodesetval->nodeNr >0) {
|
||||
model->is_online = TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue