From: Stefan Seyfried <stefan.seyfried@googlemail.com>
To: BlueZ devel list <linux-bluetooth@vger.kernel.org>
Cc: Susanne Goldammer <susanne.goldammer@gmx.de>
Subject: Re: Make bluetoothd start w/o SDP Server
Date: Thu, 12 Nov 2009 13:13:57 +0100 [thread overview]
Message-ID: <20091112131357.1106213e@strolchi.home.s3e.de> (raw)
In-Reply-To: <4AFBD3B6.6020706@gmx.de>
Hi Susanne,
On Thu, 12 Nov 2009 10:21:58 +0100
Susanne Goldammer <susanne.goldammer@gmx.de> wrote:
> Hi all,
>
> I would like to explain in more detail why I use this option to start
> bluetoothd without its own SDP-Server.
Thanks for the explanation, now I understand the purpose of the patch
(debug option for regression tests) and, given that it is pretty low
overhead, I think it is a good Idea.
I'm commenting on the patch inline.
> diff -r -u bluez-4.51/debian/changelog
> bluez-4.51_patched/debian/changelog
> --- bluez-4.51/debian/changelog 2009-11-10 09:57:06.000000000 +0100
> +++ bluez-4.51_patched/debian/changelog 2009-11-10 09:55:43.000000000 +0100
a) The bluez source does not contain a debian directory and thus no
debian/changelog file.
b) bluez is now at version 4.57. Please provide a patch againt current
git.
> @@ -1,3 +1,11 @@
> +bluez (4.51-0ubuntu2-1) karmic; urgency=low
> +
> + * patch orig source with 4.51.diff.gz provided by ubuntu
> + * patch bluetoothd so we are able to start without sdp server
> +
> + -- Susanne Goldammer <susanne.goldammer@gmx.de> Tue, 10 Nov 2009
> 10:00:24 +0200
> +
> +
> bluez (4.51-0ubuntu2) karmic; urgency=low
>
> * debian/patches/01_lower_sink_ranking.patch:
> Nur in bluez-4.51/scripts: bluetooth.rules.
> diff -r -u bluez-4.51/src/main.c bluez-4.51_patched/src/main.c
> --- bluez-4.51/src/main.c 2009-08-01 21:47:07.000000000 +0200
> +++ bluez-4.51_patched/src/main.c 2009-11-10 09:47:29.000000000
> +0100 @@ -292,6 +292,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;
>
> @@ -331,6 +333,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 (debuggin option)" },
Your patch is whitespace-damaged (bluez source uses tabs for
indentation, not spaces) and thus does not apply at all.
In case your mailer mangles the patch and everything else fails, then
send it as an attachment (plain text, still).
> { NULL },
> };
>
> @@ -416,7 +421,14 @@
> }
> }
>
> - start_sdp_server(mtu, main_opts.deviceid, SDP_SERVER_COMPAT);
> + if (option_runsdp != 0) {
> + start_sdp_server(mtu, main_opts.deviceid,
> SDP_SERVER_COMPAT);
> + }
> + else {
> + /* see scp-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 @@ -445,7 +457,13 @@
>
> plugin_cleanup();
>
> - stop_sdp_server();
> + if (option_runsdp != 0) {
Coding style: no curly braces around single line conditionals.
> + stop_sdp_server();
> + }
> + else {
again, no curly braces
> + /* see scp-server.c: stop_sdp_server() */
scp-server.c?
> + sdp_svcdb_reset();
I don't know the internals, so maybe explaining shortly why this is
needed even when no SDP service was running is a good idea (but maybe
this is elaborated in great detail in sdpd-server.c comments already,
then the comment above may be fine.
> + }
Have fun :-)
seife
--
Stefan Seyfried
"You sure you software suspend guys haven't been hanging out with the
IDE maintainers?" -- Rob Landley
next prev parent reply other threads:[~2009-11-12 12:13 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 [this message]
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
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=20091112131357.1106213e@strolchi.home.s3e.de \
--to=stefan.seyfried@googlemail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=susanne.goldammer@gmx.de \
/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