diff options
author | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2006-09-29 20:22:24 +0000 |
---|---|---|
committer | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2006-09-29 20:22:24 +0000 |
commit | 2d2c7224503508dd3996d7acb75f05bb7990c86f (patch) | |
tree | e2bfde42beb8a216ee36de7c7c29c0715007a4b8 /hcid/dbus-sdp.c | |
parent | 7e656457c2ea1ff676a9125c189a7ec9101c36a1 (diff) |
GetRemoteServiceHandles: request browsing when the match string is empty
Diffstat (limited to 'hcid/dbus-sdp.c')
-rw-r--r-- | hcid/dbus-sdp.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/hcid/dbus-sdp.c b/hcid/dbus-sdp.c index 7fc4e451..f538d297 100644 --- a/hcid/dbus-sdp.c +++ b/hcid/dbus-sdp.c @@ -946,8 +946,12 @@ static int remote_svc_handles_conn_cb(struct transaction_context *ctxt) DBUS_TYPE_STRING, &svc, DBUS_TYPE_INVALID); - class = sdp_str2svclass(svc); - sdp_uuid16_create(&uuid, class); + if (strlen(svc) > 0 ){ + class = sdp_str2svclass(svc); + sdp_uuid16_create(&uuid, class); + } else + sdp_uuid16_create(&uuid, PUBLIC_BROWSE_GROUP); + search = sdp_list_append(0, &uuid); /* Create/send the search request and set the callback to indicate the request completion */ @@ -977,10 +981,12 @@ DBusHandlerResult get_remote_svc_handles(DBusConnection *conn, DBusMessage *msg, DBUS_TYPE_INVALID)) return error_invalid_arguments(conn, msg); - class = sdp_str2svclass(svc); - if (!class) { - error("Invalid service class name"); - return error_invalid_arguments(conn, msg); + if (strlen(svc) > 0) { + class = sdp_str2svclass(svc); + if (!class) { + error("Invalid service class name"); + return error_invalid_arguments(conn, msg); + } } if (find_pending_connect(dst)) |