diff options
| author | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2007-03-29 14:01:25 +0000 | 
|---|---|---|
| committer | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2007-03-29 14:01:25 +0000 | 
| commit | fe648edb4d67bb603509f392d3c82ebfe8334921 (patch) | |
| tree | 2eaa330b4db575116af98a2f914b63f4ecd67184 /network/manager.c | |
| parent | ead055c1bc5bf032488d2b71838596a3e355a707 (diff) | |
Add code to extract record attributes.
Diffstat (limited to 'network/manager.c')
| -rw-r--r-- | network/manager.c | 10 | 
1 files changed, 8 insertions, 2 deletions
| diff --git a/network/manager.c b/network/manager.c index 58c335bb..2f745c1c 100644 --- a/network/manager.c +++ b/network/manager.c @@ -29,6 +29,8 @@  #include <bluetooth/hci.h>  #include <bluetooth/hci_lib.h>  #include <bluetooth/bnep.h> +#include <bluetooth/sdp.h> +#include <bluetooth/sdp_lib.h>  #include <glib.h> @@ -178,8 +180,9 @@ static void pan_record_reply(DBusPendingCall *call, void *data)  	struct pending_reply *pr = data;  	DBusMessage *reply = dbus_pending_call_steal_reply(call);  	DBusError derr; -	int len; +	int len, scanned;  	uint8_t *rec_bin; +	sdp_record_t *rec;  	dbus_error_init(&derr);  	if (dbus_set_error_from_message(&derr, reply)) { @@ -207,8 +210,10 @@ static void pan_record_reply(DBusPendingCall *call, void *data)  		goto fail;  	} +	rec = sdp_extract_pdu(rec_bin, &scanned); -	if (connection_register(pr->conn, pr->path, pr->addr, pr->id) == -1) { +	if (connection_register(pr->conn, pr->path, pr->addr, pr->id, +				rec) == -1) {  		err_failed(pr->conn, pr->msg, "D-Bus path registration failed");  		goto fail;  	} @@ -218,6 +223,7 @@ static void pan_record_reply(DBusPendingCall *call, void *data)  	create_path(pr->conn, pr->msg, g_strdup (pr->path), "ConnectionCreated");  fail: +	sdp_record_free(rec);  	dbus_error_free(&derr);  	pending_reply_free(pr);  	dbus_message_unref(reply); | 
