[PATCH 1/2] Inverted steps in update_lock_info_context_step

Carlo Lobrano c.lobrano at gmail.com
Wed Jun 1 14:34:50 UTC 2016


Hi, has this change already merged?

On Fri, 13 May 2016 at 20:05 Aleksander Morgado <aleksander at aleksander.es>
wrote:

> On Fri, May 13, 2016 at 5:15 PM, Carlo Lobrano <c.lobrano at gmail.com>
> wrote:
> > Inverted steps UPDATE_LOCK_INFO_CONTEXT_STEP_RETRIES and
> > UPDATE_LOCK_INFO_CONTEXT_STEP_AFTER_UNLOCK.
> >
> > Soon after the unlock, the SIM can be busy and
> > loading unlock retries might fail.
> >
> > When implemented, let run "after unlock" logic before any other step in
> > update lock info, when SIM is not locked this change does not have any
> > effect since "after unlock" is not executed.
> > ---
>
> Yeah, I think this makes sense.
>
> >  src/mm-iface-modem.c | 32 ++++++++++++++++----------------
> >  1 file changed, 16 insertions(+), 16 deletions(-)
> >
> > diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c
> > index 516ed78..bbc76ae 100644
> > --- a/src/mm-iface-modem.c
> > +++ b/src/mm-iface-modem.c
> > @@ -2907,8 +2907,8 @@ update_unlock_retries (MMIfaceModem *self,
> >  typedef enum {
> >      UPDATE_LOCK_INFO_CONTEXT_STEP_FIRST = 0,
> >      UPDATE_LOCK_INFO_CONTEXT_STEP_LOCK,
> > -    UPDATE_LOCK_INFO_CONTEXT_STEP_RETRIES,
> >      UPDATE_LOCK_INFO_CONTEXT_STEP_AFTER_UNLOCK,
> > +    UPDATE_LOCK_INFO_CONTEXT_STEP_RETRIES,
> >      UPDATE_LOCK_INFO_CONTEXT_STEP_LAST
> >  } UpdateLockInfoContextStep;
> >
> > @@ -3073,21 +3073,7 @@ update_lock_info_context_step
> (UpdateLockInfoContext *ctx)
> >
> >          /* Fall down to next step */
> >          ctx->step++;
> > -
> > -    case UPDATE_LOCK_INFO_CONTEXT_STEP_RETRIES:
> > -        /* Load unlock retries if possible */
> > -        if (MM_IFACE_MODEM_GET_INTERFACE
> (ctx->self)->load_unlock_retries &&
> > -            MM_IFACE_MODEM_GET_INTERFACE
> (ctx->self)->load_unlock_retries_finish) {
> > -            MM_IFACE_MODEM_GET_INTERFACE
> (ctx->self)->load_unlock_retries (
> > -                ctx->self,
> > -                (GAsyncReadyCallback)load_unlock_retries_ready,
> > -                ctx);
> > -            return;
> > -        }
> > -
> > -        /* Fall down to next step */
> > -        ctx->step++;
> > -
> > +
> >      case UPDATE_LOCK_INFO_CONTEXT_STEP_AFTER_UNLOCK:
> >          /* If we get that no lock is required, run the after SIM unlock
> step
> >           * in order to wait for the SIM to get ready.  Skip waiting on
> > @@ -3113,6 +3099,20 @@ update_lock_info_context_step
> (UpdateLockInfoContext *ctx)
> >          /* Fall down to next step */
> >          ctx->step++;
> >
> > +    case UPDATE_LOCK_INFO_CONTEXT_STEP_RETRIES:
> > +        /* Load unlock retries if possible */
> > +        if (MM_IFACE_MODEM_GET_INTERFACE
> (ctx->self)->load_unlock_retries &&
> > +            MM_IFACE_MODEM_GET_INTERFACE
> (ctx->self)->load_unlock_retries_finish) {
> > +            MM_IFACE_MODEM_GET_INTERFACE
> (ctx->self)->load_unlock_retries (
> > +                ctx->self,
> > +                (GAsyncReadyCallback)load_unlock_retries_ready,
> > +                ctx);
> > +            return;
> > +        }
> > +
> > +        /* Fall down to next step */
> > +        ctx->step++;
> > +
> >      case UPDATE_LOCK_INFO_CONTEXT_STEP_LAST:
> >          if (ctx->saved_error) {
> >              /* Return saved error */
> > --
> > 2.1.4
> >
> > _______________________________________________
> > ModemManager-devel mailing list
> > ModemManager-devel at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
>
>
>
> --
> Aleksander
> https://aleksander.es
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20160601/f746cb85/attachment.html>


More information about the ModemManager-devel mailing list