diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2007-01-20 01:12:39 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2007-01-20 01:12:39 +0000 |
commit | a38538129fe3e061ee324c6e05cf0eb62b020513 (patch) | |
tree | b32c7895b1ceb7d5f7fb779a486136714ced0306 /hcid/dbus-common.c | |
parent | bc5f5cda05a8432fadb53318222804c3a22e6ce0 (diff) |
Support internal and external SDP servers
Diffstat (limited to 'hcid/dbus-common.c')
-rw-r--r-- | hcid/dbus-common.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/hcid/dbus-common.c b/hcid/dbus-common.c index c84b7c37..f70f1c2f 100644 --- a/hcid/dbus-common.c +++ b/hcid/dbus-common.c @@ -368,7 +368,7 @@ int hcid_dbus_init(void) return 0; } -int register_sdp_record(uint8_t *data, uint32_t size, uint32_t *handle) +int register_sdp_binary(uint8_t *data, uint32_t size, uint32_t *handle) { if (!sess) { sess = sdp_connect(BDADDR_ANY, BDADDR_LOCAL, 0); @@ -383,6 +383,20 @@ int register_sdp_record(uint8_t *data, uint32_t size, uint32_t *handle) data, size, 0, handle); } +int register_sdp_record(sdp_record_t *rec) +{ + if (!sess) { + sess = sdp_connect(BDADDR_ANY, BDADDR_LOCAL, 0); + if (!sess) { + error("Can't connect to SDP daemon:(%s, %d)", + strerror(errno), errno); + return -1; + } + } + + return sdp_device_record_register(sess, BDADDR_ANY, rec, 0); +} + int unregister_sdp_record(uint32_t handle) { if (!sess) |