Open Source Telephony
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH v2] SpeedUp: enable online/offline
Date: Tue, 10 Apr 2012 02:40:12 -0500	[thread overview]
Message-ID: <4F83E3DC.30203@gmail.com> (raw)
In-Reply-To: <1334052671-6638-1-git-send-email-bertrand.aygon@intel.com>

[-- Attachment #1: Type: text/plain, Size: 701 bytes --]

Hi Bertrand,

> @@ -232,12 +236,122 @@ static int speedup_disable(struct ofono_modem *modem)
>  	g_at_chat_cancel_all(data->aux);
>  	g_at_chat_unregister_all(data->aux);
>  
> +	/* Cleanup potential online enable polling */
> +	if (data->online_poll_source > 0) {
> +		g_source_remove(data->online_poll_source);
> +		data->online_poll_source = 0;
> +
> +		g_free(data->online_cbd);
> +		data->online_cbd = NULL;
> +	}
> +

This looks fine, but it is actually in the wrong place.  The core
doesn't allow concurrent online and disable operations.  This really
belongs in speedup_remove so that you take care of the case where the
modem is physically yanked out.

Regards,
-Denis

  reply	other threads:[~2012-04-10  7:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-10 10:11 [PATCH v2] SpeedUp: enable online/offline Bertrand Aygon
2012-04-10  7:40 ` Denis Kenzior [this message]
2012-04-11  7:17   ` Aygon, Bertrand

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=4F83E3DC.30203@gmail.com \
    --to=denkenz@gmail.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