From: Szymon Janc Date: Thu, 10 Oct 2013 09:38:49 +0000 (+0200) Subject: Don't register Device ID record on sdp server start X-Git-Tag: android-x86-4.4-r3~7452 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=902f14d18882a3ab951a67e018868d2cb7140ddb;p=android-x86%2Fexternal-bluetooth-bluez.git Don't register Device ID record on sdp server start This makes SDP code no longer depends on main_opts. DID record is now registered from main() after sdp server was started. This is OK since mainloop is not yet running and record will be present when first request comes. --- diff --git a/src/main.c b/src/main.c index eafe2ed92..91d90b417 100644 --- a/src/main.c +++ b/src/main.c @@ -550,6 +550,10 @@ int main(int argc, char *argv[]) start_sdp_server(sdp_mtu, sdp_flags); + if (main_opts.did_source > 0) + register_device_id(main_opts.did_source, main_opts.did_vendor, + main_opts.did_product, main_opts.did_version); + /* 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 * best order of how to init various subsystems of the Bluetooth diff --git a/src/sdpd-server.c b/src/sdpd-server.c index 10e46a1be..b411abef3 100644 --- a/src/sdpd-server.c +++ b/src/sdpd-server.c @@ -42,7 +42,6 @@ #include -#include "hcid.h" #include "log.h" #include "sdpd.h" @@ -238,10 +237,6 @@ int start_sdp_server(uint16_t mtu, uint32_t flags) return -1; } - if (main_opts.did_source > 0) - register_device_id(main_opts.did_source, main_opts.did_vendor, - main_opts.did_product, main_opts.did_version); - io = g_io_channel_unix_new(l2cap_sock); g_io_channel_set_close_on_unref(io, TRUE);