Use right slot and application to get card status, PIN status and PIN retries. Without this patch, SIMs where selected application and slot numbers are different are not detected. --- drivers/qmimodem/sim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/qmimodem/sim.c b/drivers/qmimodem/sim.c index 9aa943b..1ac5068 100644 --- a/drivers/qmimodem/sim.c +++ b/drivers/qmimodem/sim.c @@ -564,7 +564,7 @@ static enum get_card_status_result handle_get_card_status_result( index = GUINT16_FROM_LE(status->index_gw_pri); - if ((index & 0xff) == i && (index >> 8) == n) { + if ((index & 0xff) == n && (index >> 8) == i) { if (get_card_status(slot, info1, info2, sim_stat)) res = GET_CARD_STATUS_RESULT_TEMP_ERROR; -- 2.7.4 _______________________________________________ ofono mailing list ofono@ofono.org https://lists.ofono.org/mailman/listinfo/ofono