sim: Fix not updating sim pin state

In case we try to enter the PIN/PUK and fail to enter a correct code,
the PIN/PUK retries are not rechecked as they should be.

Reported by: Florent Beillonnet <florent.beillonnet@gmail.com>
This commit is contained in:
Denis Kenzior 2018-06-05 12:54:43 -05:00
parent ecc3f1bf73
commit d715486525
1 changed files with 2 additions and 1 deletions

View File

@ -847,7 +847,8 @@ static void sim_enter_pin_cb(const struct ofono_error *error, void *data)
__ofono_dbus_pending_reply(&sim->pending, reply);
if (sim->initialized)
/* If PIN entry fails, then recheck the PIN type */
if (sim->initialized || error->type != OFONO_ERROR_TYPE_NO_ERROR)
goto recheck;
if (sim->pin_type == OFONO_SIM_PASSWORD_SIM_PIN ||