From: Marcel Holtmann <marcel@holtmann.org>
To: BlueZ users <bluez-users@lists.sourceforge.net>
Subject: Re: [Bluez-users] Where does the Bluez stores registered services?
Date: Thu, 19 Apr 2007 01:45:36 +0200 [thread overview]
Message-ID: <1176939936.6741.39.camel@aeonflux.holtmann.net> (raw)
In-Reply-To: <b621074b0704162102u3100c63ax15be998c472ecf3f@mail.gmail.com>
Hi Tushar,
> The code snippet that I'm using for registering new service record
> is as below .
>
> #define BT_INVALID_SDDB_HANDLE 0
> ....
> bt_result_t bt_sddb_update_record(bt_record_t *record)
> {
> int scanned;
> sdp_record_t *rec = sdp_extract_pdu((uint8_t *)record->data,
> &scanned);
> if (rec == NULL) {
> return BT_RESULT_FAILURE;
> }
>
> if (record->id == BT_INVALID_SDDB_HANDLE) {
> if (sdp_record_register(g_sess, rec, 0) < 0) {
> sdp_record_free(rec);
> return BT_RESULT_FAILURE;
> }
> record->id = (bt_sddbid_t)rec->handle;
> return BT_RESULT_SUCCESS;
> } else {
> int retval;
> rec->handle = record->id;
> retval = sdp_record_update(g_sess, rec);
> sdp_record_free(rec);
> if (retval < 0) {
> return BT_RESULT_FAILURE;
> }
> record->id = (bt_sddbid_t)rec->handle;
> return BT_RESULT_SUCCESS;
> }
> }
>
>
>
> In this code sdp_record_register return with success but the value
> of "rec->handle " is set to zero (0). This is problem for me. I think
> the value should be greater than zero or ideally 1. Because the "
> record" that is passed with service information has set it's handle to
> zero i.e it point to the default service record.
>
> This is causes problem in the upper layer of java implementation . So
> I need to kill the app manually at present. But it seems
> "sdp_record_register" operation is success because the registered
> service can be browsed by external device.
I don't see your problem, but you might really consider to use the D-Bus
based service record registration. You can even use XML based service
record description.
Regards
Marcel
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
prev parent reply other threads:[~2007-04-18 23:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-16 8:59 [Bluez-users] Where does the Bluez stores registered services? Tushar Paturde
2007-04-16 12:41 ` Marcel Holtmann
2007-04-17 4:02 ` Tushar Paturde
2007-04-18 23:45 ` Marcel Holtmann [this message]
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=1176939936.6741.39.camel@aeonflux.holtmann.net \
--to=marcel@holtmann.org \
--cc=bluez-users@lists.sourceforge.net \
/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