[S] Change in osmocom-bb[master]: layer23: Define sim_pin_required field as bool
pespin has uploaded this change for review. ( 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(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/99/32799/1 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 9d392d1..bc5031b 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: 1 Gerrit-Owner: pespin <pespin@sysmocom.de> Gerrit-MessageType: newchange
participants (1)
-
pespin