public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Susanne Goldammer <susanne.goldammer@gmx.de>
To: Bastien Nocera <hadess@hadess.net>
Cc: BlueZ devel list <linux-bluetooth@vger.kernel.org>
Subject: Re: Make bluetoothd start w/o SDP Server
Date: Thu, 12 Nov 2009 16:16:19 +0100	[thread overview]
Message-ID: <4AFC26C3.50006@gmx.de> (raw)
In-Reply-To: <1258037845.2158.0.camel@localhost.localdomain>

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

Bastien Nocera schrieb:
> On Thu, 2009-11-12 at 15:13 +0100, Susanne Goldammer wrote:
>   
>> +                               "Don't run SDP service (debuggin
>> option)" },
>>     
>
> Typo there: s/debuggin/debugging/
>
>   
Fixed. New patch attached.

[-- Attachment #2: no_sdp_server_option.patch --]
[-- Type: text/plain, Size: 1422 bytes --]

diff -r -u bluez-4.57/src/main.c bluez-4.57_no_sdp_option/src/main.c
--- bluez-4.57/src/main.c	2009-10-04 05:56:37.000000000 +0200
+++ bluez-4.57_no_sdp_option/src/main.c	2009-11-12 16:09:32.000000000 +0100
@@ -296,6 +296,8 @@
 static gboolean option_detach = TRUE;
 static gboolean option_debug = FALSE;
 static gboolean option_udev = FALSE;
+static gboolean option_runsdp = TRUE;
+
 
 static guint last_adapter_timeout = 0;
 
@@ -335,6 +337,9 @@
 				"Enable debug information output" },
 	{ "udev", 'u', 0, G_OPTION_ARG_NONE, &option_udev,
 				"Run from udev mode of operation" },
+	{ "nosdp", 'S', G_OPTION_FLAG_REVERSE,
+				G_OPTION_ARG_NONE, &option_runsdp,
+				"Don't run SDP service (debugging option)" },
 	{ NULL },
 };
 
@@ -429,7 +434,13 @@
 		}
 	}
 
-	start_sdp_server(mtu, main_opts.deviceid, SDP_SERVER_COMPAT);
+	if (option_runsdp == TRUE)
+		start_sdp_server(mtu, main_opts.deviceid, SDP_SERVER_COMPAT);
+	else {
+		/* see sdpd-server.c: start_sdp_server() -> init_server() */
+		register_public_browse_group();
+		register_server_service();
+	}
 
 	/* Loading plugins has to be done after D-Bus has been setup since
 	 * the plugins might wanna expose some paths on the bus. However the
@@ -458,7 +469,11 @@
 
 	plugin_cleanup();
 
-	stop_sdp_server();
+	if (option_runsdp == TRUE) 
+		stop_sdp_server();
+	else
+		/* see sdpd-server.c: stop_sdp_server() */
+		sdp_svcdb_reset();
 
 	agent_exit();
 

  reply	other threads:[~2009-11-12 15:16 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-10 14:00 Make bluetoothd start w/o SDP Server Susanne Goldammer
2009-11-10 14:05 ` Bastien Nocera
2009-11-10 14:19   ` Susanne Goldammer
2009-11-12  9:21     ` Susanne Goldammer
2009-11-12 10:16       ` Iain Hibbert
2009-11-12 10:47         ` Susanne Goldammer
2009-11-12 12:13       ` Stefan Seyfried
2009-11-12 12:55         ` Susanne Goldammer
2009-11-12 13:08           ` Stefan Seyfried
2009-11-12 14:13             ` Susanne Goldammer
2009-11-12 14:57               ` Bastien Nocera
2009-11-12 15:16                 ` Susanne Goldammer [this message]
2009-11-13 11:33                   ` Johan Hedberg
2009-11-13 11:58                     ` Marcel Holtmann
2009-11-13 12:33                       ` Johan Hedberg
2009-11-13 12:36                       ` Susanne Goldammer

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=4AFC26C3.50006@gmx.de \
    --to=susanne.goldammer@gmx.de \
    --cc=hadess@hadess.net \
    --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