Skip to content

Commit

Permalink
activation: Fix parsing of description from buddyml response
Browse files Browse the repository at this point in the history
  • Loading branch information
nikias committed Jan 27, 2019
1 parent a2dfb1b commit ff37642
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/activation.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,11 +314,17 @@ static idevice_activation_error_t idevice_activation_parse_buddyml_response(idev
xmlXPathFreeObject(xpath_result);
xpath_result = NULL;
}
xpath_result = xmlXPathEvalExpression((const xmlChar*) "/xmlui/page/tableView/section[@footer and not(@footerLinkURL)]/@footer", context);
xpath_result = xmlXPathEvalExpression((const xmlChar*) "/xmlui/page/tableView/section/footer[not (@url)]", context);
if (!xpath_result) {
result = IDEVICE_ACTIVATION_E_INTERNAL_ERROR;
goto cleanup;
}
if (!xpath_result->nodesetval) {
xmlXPathFreeObject(xpath_result);
xpath_result = xmlXPathEvalExpression((const xmlChar*) "/xmlui/page/tableView/section[@footer and not(@footerLinkURL)]/@footer", context);
result = IDEVICE_ACTIVATION_E_INTERNAL_ERROR;
goto cleanup;
}

if (xpath_result->nodesetval) {
char* response_description = (char*) malloc(sizeof(char));
Expand Down Expand Up @@ -348,6 +354,7 @@ static idevice_activation_error_t idevice_activation_parse_buddyml_response(idev
xmlXPathFreeObject(xpath_result);
xpath_result = NULL;
}

xpath_result = xmlXPathEvalExpression((const xmlChar*) "/xmlui/page//editableTextRow", context);
if (!xpath_result) {
result = IDEVICE_ACTIVATION_E_INTERNAL_ERROR;
Expand Down

0 comments on commit ff37642

Please sign in to comment.