Linux bluetooth development
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: chen.ganir@ti.com
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH v4 3/3] GATT: Profile support for EnableGatt
Date: Mon, 26 Mar 2012 12:21:20 +0300	[thread overview]
Message-ID: <20120326092120.GA322@x220> (raw)
In-Reply-To: <1332169073-15885-4-git-send-email-chen.ganir@ti.com>

Hi Chen,

On Mon, Mar 19, 2012, chen.ganir@ti.com wrote:
> --- a/alert/main.c
> +++ b/alert/main.c
> @@ -28,6 +28,7 @@
>  
>  #include <stdint.h>
>  #include <glib.h>
> +#include <errno.h>
>  
>  #include "plugin.h"
>  #include "hcid.h"
> @@ -37,8 +38,8 @@
>  static int alert_init(void)
>  {
>  	if (!main_opts.gatt_enabled) {
> -		DBG("Attribute server is disabled");
> -		return -1;
> +		DBG("GATT is disabled");
> +		return -ENOTSUP;
>  	}

I've applied all three patches, but I think it'd be cleaner to have the
check for main_opts.gatt_enabled in a single central place instead of
each plugin having to do it by themselves (in general any access to
main_opts from plugins should imo be avoided).

The first idea that comes to mind is that gatt_service_add() should be
the one checking for this conf-option and plugins should check for
failure of that function.

Johan

  reply	other threads:[~2012-03-26  9:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-19 14:57 [PATCH v4 0/3] GATT: Change the way GATT Plugins are enabled/disabled chen.ganir
2012-03-19 14:57 ` [PATCH v4 1/3] GATT: Remove individual config switches chen.ganir
2012-03-19 14:57 ` [PATCH v4 2/3] GATT: Rename AttributeServer switch chen.ganir
2012-03-19 14:57 ` [PATCH v4 3/3] GATT: Profile support for EnableGatt chen.ganir
2012-03-26  9:21   ` Johan Hedberg [this message]
2012-03-26  9:34     ` Ganir, Chen

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=20120326092120.GA322@x220 \
    --to=johan.hedberg@gmail.com \
    --cc=chen.ganir@ti.com \
    --cc=linux-bluetooth@vger.kernel.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