Commit 92964838 authored by jehan's avatar jehan

fix pidfonline checking

parent 32b7ce6d
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment