Hi Denis,
On 17 February 2011 22:03, Denis Kenzior <denkenz(a)gmail.com> wrote:
On 02/15/2011 01:58 AM, Andrzej Zaborowski wrote:
> ---
> src/ofono.h | 4 ++
> src/sim.c | 163 ++++++++++++++++++++++++++++++++++++++++++++++++++++++----
> 2 files changed, 155 insertions(+), 12 deletions(-)
>
Patch has been applied, but some comments below:
> + if (reinit_naa) {
> + /* Force the sim state out of READY */
> +
> + sim_free_main_state(sim);
> +
> + sim->state = OFONO_SIM_STATE_INSERTED;
> + for (l = sim->state_watches->items; l; l = l->next) {
> + struct ofono_watchlist_item *item = l->data;
> + notify = item->notify;
> +
> + notify(sim->state, item->notify_data);
> + }
I changed this to directly call the modem object and force it into
pre-sim state. I think this is a bit more clear than your proposed
approach.
Looks good to me, maybe it would be even better if this was just a
different type of sim state change, like OFONO_SIM_STATE_NOT_READY so
it is handled in a similar way as other events.
Another question here is whether we want to maintain two separate simfs
contexts. One for the main state and one for the early state. This
might make things a bit easier to implement for patch 3 in this series.
I was thinking about that too, I'll send a patch to implement this.
Best regards