Open Source Telephony
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 3/3] bluetooth: fix not removing data when devices/adapters are removed
Date: Fri, 01 Jul 2011 03:21:32 -0500	[thread overview]
Message-ID: <4E0D838C.9000304@gmail.com> (raw)
In-Reply-To: <1309504344-23058-3-git-send-email-luiz.dentz@gmail.com>

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

Hi Luiz,

On 07/01/2011 02:12 AM, Luiz Augusto von Dentz wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> If an adapter or device is removed any data associate should be removed,
> otherwise the next time they appear/are created the drivers may not
> asssociate again.
> ---
>  plugins/bluetooth.c |   79 ++++++++++++++++++++++++++++++++++++--------------
>  plugins/bluetooth.h |    4 +-
>  plugins/hfp_hf.c    |   30 ++++++++++++-------
>  3 files changed, 78 insertions(+), 35 deletions(-)

Patch looks good, just one quick question:

> @@ -443,25 +443,33 @@ free:
>  	return -ENOMEM;
>  }
>  
> -static gboolean hfp_remove_each_modem(gpointer key, gpointer value,
> +static gboolean hfp_remove_modem(gpointer key, gpointer value,
>  					gpointer user_data)
>  {
>  	struct ofono_modem *modem = value;
> +	const char *device = key;
> +	const char *prefix = user_data;
> +
> +	if (prefix && g_str_has_prefix(device, prefix) == FALSE)
> +		return TRUE;

Are you sure you want to return TRUE here?  By my reading TRUE should be
removed only if the key should be removed.  That seems not to be what
you want...

>  
>  	ofono_modem_remove(modem);
>  
>  	return TRUE;
>  }
>  

Regards,
-Denis

  reply	other threads:[~2011-07-01  8:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-01  7:12 [PATCH 1/3] bluetooth: use lower case for UUIDs Luiz Augusto von Dentz
2011-07-01  7:12 ` [PATCH 2/3] bluetooth: make uuid profile detection more generic Luiz Augusto von Dentz
2011-07-01  8:14   ` Denis Kenzior
2011-07-01  7:12 ` [PATCH 3/3] bluetooth: fix not removing data when devices/adapters are removed Luiz Augusto von Dentz
2011-07-01  8:21   ` Denis Kenzior [this message]
2011-07-02 19:04     ` Luiz Augusto von Dentz
2011-07-01  8:13 ` [PATCH 1/3] bluetooth: use lower case for UUIDs Denis Kenzior

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=4E0D838C.9000304@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