summaryrefslogtreecommitdiff
path: root/src/profile.c
diff options
context:
space:
mode:
authorSzymon Janc <szymon.janc@tieto.com>2013-09-19 16:00:42 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2013-09-23 10:42:59 +0300
commit3a34949d8517f36cab898a87628ccf3818431980 (patch)
tree07708124aecfe958a31c66ca233bef1a57d85f27 /src/profile.c
parent6ae04b357f83d5e932b2e088c2fb13168d9b9b60 (diff)
downloadbluez-3a34949d8517f36cab898a87628ccf3818431980.tar.gz
adapter: Handle adding new SDP records
Make adapter in charge of updating SDP database. This allow to decouple SDP of code used for notifying adapters about SDP database change.
Diffstat (limited to 'src/profile.c')
-rw-r--r--src/profile.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/profile.c b/src/profile.c
index 523e11931..f2c1e6f52 100644
--- a/src/profile.c
+++ b/src/profile.c
@@ -1179,7 +1179,7 @@ static void ext_direct_connect(GIOChannel *io, GError *err, gpointer user_data)
static uint32_t ext_register_record(struct ext_profile *ext,
struct ext_io *l2cap,
struct ext_io *rfcomm,
- const bdaddr_t *src)
+ struct btd_adapter *a)
{
sdp_record_t *rec;
char *dyn_record = NULL;
@@ -1202,7 +1202,7 @@ static uint32_t ext_register_record(struct ext_profile *ext,
return 0;
}
- if (add_record_to_server(src, rec) < 0) {
+ if (adapter_service_add(a, rec) < 0) {
error("Failed to register service record");
sdp_record_free(rec);
return 0;
@@ -1304,8 +1304,7 @@ static uint32_t ext_start_servers(struct ext_profile *ext,
}
}
- return ext_register_record(ext, l2cap, rfcomm,
- adapter_get_address(adapter));
+ return ext_register_record(ext, l2cap, rfcomm, adapter);
failed:
if (l2cap) {