From: Kalle Valo <kalle.valo@canonical.com>
To: ofono@ofono.org
Subject: Re: [PATCH] huawei: follow sim state change notifications
Date: Tue, 25 May 2010 11:34:23 +0300 [thread overview]
Message-ID: <871vd0mlbk.fsf@potku.valot.fi> (raw)
In-Reply-To: <1274774518.27220.121.camel@localhost.localdomain>
[-- Attachment #1: Type: text/plain, Size: 1042 bytes --]
Marcel Holtmann <marcel@holtmann.org> writes:
> Hi Kalle,
Hi Marcel,
>> +enum huawei_state {
>> + HUAWEI_DISABLED,
>> + HUAWEI_DISABLE,
>> + HUAWEI_ENABLE,
>> + HUAWEI_ENABLED,
>> +};
>> +
>
> is this really needed? I don't see why you want it. Where is the race
> condition that you are trying to fix with it.
I tried to avoid calling ofono_modem_set_powered() subsequent times. For
example, this was the case I was worried about:
1. AT^SYSINFO returns 1 and we call ofono_modem_set_powered(modem, TRUE)
2. Later on (for some reason) we receive ^SIMST: 1 and again call
ofono_modem_set_powered(modem, TRUE)
But now that I think more about this, I was just too careful here. We
don't need that state variable here.
>> struct huawei_data {
>> GAtChat *chat;
>> GAtChat *event;
>> + gint sim_state;
>> + enum huawei_state state;
>> };
>
> I think the sim_state should be just enough.
You are right. I'll remove the state variable and send v2.
Thanks for the review.
--
Kalle Valo
prev parent reply other threads:[~2010-05-25 8:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-25 7:56 [PATCH] huawei: follow sim state change notifications Kalle Valo
2010-05-25 8:01 ` Marcel Holtmann
2010-05-25 8:34 ` Kalle Valo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871vd0mlbk.fsf@potku.valot.fi \
--to=kalle.valo@canonical.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox