From fe648edb4d67bb603509f392d3c82ebfe8334921 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Thu, 29 Mar 2007 14:01:25 +0000 Subject: Add code to extract record attributes. --- network/manager.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'network/manager.c') 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 #include #include +#include +#include #include @@ -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); -- cgit