Skip to content
Snippets Groups Projects
Commit 9a5858db authored by Jakob Olsson's avatar Jakob Olsson
Browse files

remove garbage printout to test unlock_sim

parent 58148548
No related branches found
No related tags found
No related merge requests found
......@@ -27,7 +27,7 @@ const struct blobmsg_policy pin_policy[__PIN_MAX] = {
};
const struct blobmsg_policy unlock_policy[__UNLOCK_MAX] = {
[UNLOCK_PIN] = {.name = "pin", .type = BLOBMSG_TYPE_STRING},
[UNLOCK_PIN] = {.name = "new_pin", .type = BLOBMSG_TYPE_STRING},
[PUK] = {.name = "puk", .type = BLOBMSG_TYPE_STRING},
};
......@@ -294,19 +294,19 @@ int unlock_sim(struct ubus_context *ctx, struct ubus_object *obj,
}
puk = (char *)blobmsg_data(tb[PUK]);
pin = (char *)blobmsg_data(tb[UNLOCK_PIN]);
printf("puk %s, pin %s\n", puk, pin);
rv = validate_pin_format(pin);
if (rv < 0)
goto fail_input;
printf("survived pin format\n");
rv = validate_puk_format(puk);
if (rv < 0)
goto fail_input;
printf("survived puk format\n");
response = mobile_unlock_sim(global_dev, pin, puk);
if (!response)
goto fail_unknown;
printf("did not survive the library\n");
return print_to_ubus(response, ctx, req);
fail_input:
return UBUS_STATUS_INVALID_ARGUMENT;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment