* [PATCH] huawei: do not set timer more than once
@ 2011-01-19 13:07 Lucas De Marchi
2011-01-19 13:22 ` Marcel Holtmann
0 siblings, 1 reply; 3+ messages in thread
From: Lucas De Marchi @ 2011-01-19 13:07 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 849 bytes --]
If a "^SYSINFO" arrives after the timer for query_sim_locked() has been
set up, it'd would set a new timer, signaling a sim state change more
than once.
---
plugins/huawei.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/plugins/huawei.c b/plugins/huawei.c
index d6a9d68..b4b7436 100644
--- a/plugins/huawei.c
+++ b/plugins/huawei.c
@@ -289,7 +289,8 @@ static void sysinfo_cb(gboolean ok, GAtResult *result, gpointer user_data)
data->sim_poll_timeout = g_timeout_add_seconds(2,
query_sim_state,
modem);
- } else if (sim_state == HUAWEI_SIM_STATE_INVALID_OR_LOCKED) {
+ } else if (sim_state == HUAWEI_SIM_STATE_INVALID_OR_LOCKED &&
+ !data->sim_poll_timeout) {
data->sim_poll_timeout = g_timeout_add_seconds(2,
query_sim_locked,
modem);
--
1.7.3.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] huawei: do not set timer more than once
2011-01-19 13:07 [PATCH] huawei: do not set timer more than once Lucas De Marchi
@ 2011-01-19 13:22 ` Marcel Holtmann
2011-01-19 13:31 ` Lucas De Marchi
0 siblings, 1 reply; 3+ messages in thread
From: Marcel Holtmann @ 2011-01-19 13:22 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 339 bytes --]
Hi Lucas,
> If a "^SYSINFO" arrives after the timer for query_sim_locked() has been
> set up, it'd would set a new timer, signaling a sim state change more
> than once.
> ---
> plugins/huawei.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
patch looks fine to me and so I applied it.
Regards
Marcel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] huawei: do not set timer more than once
2011-01-19 13:22 ` Marcel Holtmann
@ 2011-01-19 13:31 ` Lucas De Marchi
0 siblings, 0 replies; 3+ messages in thread
From: Lucas De Marchi @ 2011-01-19 13:31 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 589 bytes --]
On Wed, Jan 19, 2011 at 11:22 AM, Marcel Holtmann <marcel@holtmann.org> wrote:
> Hi Lucas,
>
>> If a "^SYSINFO" arrives after the timer for query_sim_locked() has been
>> set up, it'd would set a new timer, signaling a sim state change more
>> than once.
>> ---
>> plugins/huawei.c | 3 ++-
>> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> patch looks fine to me and so I applied it.
This fix the double AT+CPIN? command. There's still an issue with a
double AT+CFUN=5 that I'm tracking down. I'll send a patch for this
later.
regards,
Lucas De Marchi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-01-19 13:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-19 13:07 [PATCH] huawei: do not set timer more than once Lucas De Marchi
2011-01-19 13:22 ` Marcel Holtmann
2011-01-19 13:31 ` Lucas De Marchi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.