summaryrefslogtreecommitdiff
path: root/src/sim.c
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2019-03-28 21:05:04 -0500
committerDenis Kenzior <denkenz@gmail.com>2019-03-28 21:08:02 -0500
commitc5cb6f7a3cc0e0a25d5edae36ec165e813f1e98b (patch)
treea0096c0ebc7467335bff8490e9a8d841011c4c13 /src/sim.c
parentab4e5d0852e5bc4f8eaa83904836bed3bc18bebb (diff)
downloadofono-c5cb6f7a3cc0e0a25d5edae36ec165e813f1e98b.tar.gz
sim: Initialize card_slot_count and active_card_slot
Initialize both to 1 so that SimManager does not erroneously show ActiveCardSlot as 0 for drivers that do not (yet) setup these values.
Diffstat (limited to 'src/sim.c')
-rw-r--r--src/sim.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sim.c b/src/sim.c
index 5f63b35d..9f0183f4 100644
--- a/src/sim.c
+++ b/src/sim.c
@@ -3383,6 +3383,9 @@ struct ofono_sim *ofono_sim_create(struct ofono_modem *modem,
for (i = 0; i < OFONO_SIM_PASSWORD_INVALID; i++)
sim->pin_retries[i] = -1;
+ sim->active_card_slot = 1;
+ sim->card_slot_count = 1;
+
for (l = g_drivers; l; l = l->next) {
const struct ofono_sim_driver *drv = l->data;