All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Don't register GATT related SDP records if attrib server is disabled
@ 2011-02-23 18:15 Claudio Takahasi
  2011-02-24 18:28 ` Johan Hedberg
  0 siblings, 1 reply; 2+ messages in thread
From: Claudio Takahasi @ 2011-02-23 18:15 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Claudio Takahasi

GATT related SDP records should not be added if "AttributeServer" option
is false in the configuration file. Problem happens only when attribute
plugin is enabled.
---
 attrib/manager.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/attrib/manager.c b/attrib/manager.c
index f991f8e..a5a7de4 100644
--- a/attrib/manager.c
+++ b/attrib/manager.c
@@ -32,6 +32,7 @@
 
 #include "../src/adapter.h"
 #include "../src/device.h"
+#include "hcid.h"
 
 #include "manager.h"
 #include "client.h"
@@ -84,19 +85,20 @@ int attrib_manager_init(DBusConnection *conn)
 
 	btd_register_device_driver(&client_driver);
 
-	/*
-	 * FIXME: Add config file option to allow
-	 * enable/disable the GATT server and client.
-	 */
 
-	return server_example_init();
+	if (main_opts.attrib_server)
+		return server_example_init();
+
+	return 0;
 }
 
 void attrib_manager_exit(void)
 {
 	btd_unregister_device_driver(&client_driver);
 
-	server_example_exit();
+	if (main_opts.attrib_server)
+		server_example_exit();
+
 	attrib_client_exit();
 
 	dbus_connection_unref(connection);
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Don't register GATT related SDP records if attrib server is disabled
  2011-02-23 18:15 [PATCH] Don't register GATT related SDP records if attrib server is disabled Claudio Takahasi
@ 2011-02-24 18:28 ` Johan Hedberg
  0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2011-02-24 18:28 UTC (permalink / raw)
  To: Claudio Takahasi; +Cc: linux-bluetooth

Hi Claudio,

On Wed, Feb 23, 2011, Claudio Takahasi wrote:
> GATT related SDP records should not be added if "AttributeServer" option
> is false in the configuration file. Problem happens only when attribute
> plugin is enabled.
> ---
>  attrib/manager.c |   14 ++++++++------
>  1 files changed, 8 insertions(+), 6 deletions(-)

Pushed upstream. Thanks.

Johan

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-24 18:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-23 18:15 [PATCH] Don't register GATT related SDP records if attrib server is disabled Claudio Takahasi
2011-02-24 18:28 ` Johan Hedberg

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.