diff options
author | Jussi Kangas <jussi.kangas@tieto.com> | 2011-02-25 15:20:16 +0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2011-02-25 11:51:48 -0600 |
commit | 07c7308581c921ad1ff70903c8534ac01e62b549 (patch) | |
tree | a16529049d52854f3114f471c0411eccbe8c3655 /src/call-meter.c | |
parent | c5b321e768a9f36ba55dc9ce39d8f28c527a57eb (diff) | |
download | ofono-07c7308581c921ad1ff70903c8534ac01e62b549.tar.bz2 |
sim: check lock state with call meter
Diffstat (limited to 'src/call-meter.c')
-rw-r--r-- | src/call-meter.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/call-meter.c b/src/call-meter.c index 0789935d..73dd88e9 100644 --- a/src/call-meter.c +++ b/src/call-meter.c @@ -332,6 +332,18 @@ static void set_acm_max_query_callback(const struct ofono_error *error, set_acm_max(cm, value); } +static void check_pin2_state(struct ofono_call_meter *cm) +{ + struct ofono_atom *sim_atom; + + sim_atom = __ofono_modem_find_atom(__ofono_atom_get_modem(cm->atom), + OFONO_ATOM_TYPE_SIM); + if (sim_atom == NULL) + return; + + __ofono_sim_recheck_pin(__ofono_atom_get_data(sim_atom)); +} + static void set_acm_max_callback(const struct ofono_error *error, void *data) { struct ofono_call_meter *cm = data; @@ -340,6 +352,7 @@ static void set_acm_max_callback(const struct ofono_error *error, void *data) DBG("Setting acm_max failed"); __ofono_dbus_pending_reply(&cm->pending, __ofono_error_failed(cm->pending)); + check_pin2_state(cm); return; } @@ -401,6 +414,7 @@ static void set_puct_callback(const struct ofono_error *error, void *data) DBG("setting puct failed"); __ofono_dbus_pending_reply(&cm->pending, __ofono_error_failed(cm->pending)); + check_pin2_state(cm); return; } @@ -598,6 +612,7 @@ static void acm_reset_callback(const struct ofono_error *error, void *data) DBG("reseting acm failed"); __ofono_dbus_pending_reply(&cm->pending, __ofono_error_failed(cm->pending)); + check_pin2_state(cm); return; } |