* [PATCH] network: Fix user data handling on unregister
@ 2013-02-01 11:19 patrik.flykt
2013-02-01 15:57 ` Johan Hedberg
0 siblings, 1 reply; 2+ messages in thread
From: patrik.flykt @ 2013-02-01 11:19 UTC (permalink / raw)
To: linux-bluetooth
From: Patrik Flykt <patrik.flykt@linux.intel.com>
User data in unregister_server() is a network_adapter struct. Unregistering
using full UUID will now also work.
---
profiles/network/server.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/profiles/network/server.c b/profiles/network/server.c
index 864b49c..c8bfed5 100644
--- a/profiles/network/server.c
+++ b/profiles/network/server.c
@@ -676,7 +676,8 @@ static DBusMessage *register_server(DBusConnection *conn,
static DBusMessage *unregister_server(DBusConnection *conn,
DBusMessage *msg, void *data)
{
- struct network_server *ns = data;
+ struct network_adapter *na = data;
+ struct network_server *ns;
DBusMessage *reply;
const char *uuid;
@@ -684,7 +685,9 @@ static DBusMessage *unregister_server(DBusConnection *conn,
DBUS_TYPE_INVALID))
return btd_error_invalid_args(msg);
- if (g_strcmp0(uuid, "nap"))
+ ns = find_server_by_uuid(na->servers, uuid);
+
+ if (ns == NULL)
return btd_error_failed(msg, "Invalid UUID");
reply = dbus_message_new_method_return(msg);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] network: Fix user data handling on unregister
2013-02-01 11:19 [PATCH] network: Fix user data handling on unregister patrik.flykt
@ 2013-02-01 15:57 ` Johan Hedberg
0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2013-02-01 15:57 UTC (permalink / raw)
To: patrik.flykt; +Cc: linux-bluetooth
Hi Patrik,
On Fri, Feb 01, 2013, patrik.flykt@linux.intel.com wrote:
> User data in unregister_server() is a network_adapter struct. Unregistering
> using full UUID will now also work.
> ---
> profiles/network/server.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
Applied. Thanks.
Johan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-02-01 15:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-01 11:19 [PATCH] network: Fix user data handling on unregister patrik.flykt
2013-02-01 15:57 ` Johan Hedberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox