summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2007-06-07 11:34:54 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2007-06-07 11:34:54 +0000
commit9756e32f5a6172ec455c0ff04250a86852457b5d (patch)
tree297f364de428635cf8ce5c79dda6016f6b05dfb3
parent65bb3ff6bfa30c2f52406e25acefe3e44bef5443 (diff)
Check for adapter state in SDP methods
-rw-r--r--hcid/dbus-sdp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hcid/dbus-sdp.c b/hcid/dbus-sdp.c
index 145205f6..d6dd16ef 100644
--- a/hcid/dbus-sdp.c
+++ b/hcid/dbus-sdp.c
@@ -883,6 +883,9 @@ DBusHandlerResult get_remote_svc_rec(DBusConnection *conn, DBusMessage *msg,
int err;
connect_cb_t *cb;
+ if (!adapter->up)
+ return error_not_ready(conn, msg);
+
if (!dbus_message_get_args(msg, NULL,
DBUS_TYPE_STRING, &dst,
DBUS_TYPE_UINT32, &handle,
@@ -945,6 +948,9 @@ DBusHandlerResult get_remote_svc_handles(DBusConnection *conn, DBusMessage *msg,
int err;
uuid_t uuid;
+ if (!adapter->up)
+ return error_not_ready(conn, msg);
+
if (!dbus_message_get_args(msg, NULL,
DBUS_TYPE_STRING, &dst,
DBUS_TYPE_STRING, &svc,