summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2019-01-27 03:00:52 +0100
committerGravatar Nikias Bassen2019-01-27 03:00:52 +0100
commitff37642ad86a3d5bcd87905ea4ac27d7fc364584 (patch)
treeaf8450ebcf9bcb975ece0059060eada996e77e07
parenta2dfb1b27e34b75b81e81537ba8711f42d3f7f06 (diff)
downloadlibideviceactivation-ff37642ad86a3d5bcd87905ea4ac27d7fc364584.tar.gz
libideviceactivation-ff37642ad86a3d5bcd87905ea4ac27d7fc364584.tar.bz2
activation: Fix parsing of description from buddyml response
-rw-r--r--src/activation.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/activation.c b/src/activation.c
index 3018d0a..34ea741 100644
--- a/src/activation.c
+++ b/src/activation.c
@@ -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));
@@ -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;