Re: [PATCH v4 3/3] GATT: Profile support for EnableGatt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Chen,

On Mon, Mar 19, 2012, chen.ganir@xxxxxx 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
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux