pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/32799 ) Change subject: layer23: Define sim_pin_required field as bool ...................................................................... layer23: Define sim_pin_required field as bool Change-Id: I7c5105da08176f4743f1f3e56ddad9ac170717c7 --- M src/host/layer23/include/osmocom/bb/common/subscriber.h M src/host/layer23/src/common/subscriber.c 2 files changed, 14 insertions(+), 5 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve jolly: Looks good to me, but someone else must approve Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/host/layer23/include/osmocom/bb/common/subscriber.h b/src/host/layer23/include/osmocom/bb/common/subscriber.h index e9779e6..792df62 100644 --- a/src/host/layer23/include/osmocom/bb/common/subscriber.h +++ b/src/host/layer23/include/osmocom/bb/common/subscriber.h @@ -89,7 +89,7 @@ /* talk to SIM */ uint8_t sim_state; - uint8_t sim_pin_required; /* state: wait for PIN */ + bool sim_pin_required; /* state: wait for PIN */ uint8_t sim_file_index; uint32_t sim_handle_query; uint32_t sim_handle_update; diff --git a/src/host/layer23/src/common/subscriber.c b/src/host/layer23/src/common/subscriber.c index 5f72f52..dfd44dc 100644 --- a/src/host/layer23/src/common/subscriber.c +++ b/src/host/layer23/src/common/subscriber.c @@ -970,7 +970,7 @@ l23_vty_ms_notify(ms, NULL); l23_vty_ms_notify(ms, "Please give PIN for ICCID %s (you have " "%d tries left)\n", subscr->iccid, payload[1]); - subscr->sim_pin_required = 1; + subscr->sim_pin_required = true; break; case SIM_CAUSE_PIN1_BLOCKED: LOGP(DMM, LOGL_NOTICE, "PIN is blocked\n"); @@ -982,14 +982,14 @@ "(you have %d tries left)\n", subscr->iccid, payload[1]); } - subscr->sim_pin_required = 1; + subscr->sim_pin_required = true; break; case SIM_CAUSE_PUC_BLOCKED: LOGP(DMM, LOGL_NOTICE, "PUC is blocked\n"); l23_vty_ms_notify(ms, NULL); l23_vty_ms_notify(ms, "PUC is blocked\n"); - subscr->sim_pin_required = 1; + subscr->sim_pin_required = true; break; default: if (sf->func && !sf->mandatory) { @@ -1013,7 +1013,7 @@ /* if pin was successfully unlocked, then resend request */ if (subscr->sim_pin_required) { - subscr->sim_pin_required = 0; + subscr->sim_pin_required = false; subscr_sim_request(ms); return; } -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/32799 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I7c5105da08176f4743f1f3e56ddad9ac170717c7 Gerrit-Change-Number: 32799 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: jolly <andreas@eversberg.eu> Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-Reviewer: pespin <pespin@sysmocom.de> Gerrit-MessageType: merged