summaryrefslogtreecommitdiffstats
path: root/hcid/dbus-sdp.c
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2006-09-29 21:39:02 +0000
committerClaudio Takahasi <claudio.takahasi@openbossa.org>2006-09-29 21:39:02 +0000
commit145e7798be86fa7f0bceb9ae784de566d2272ed6 (patch)
treecc80404df2147405ab6df6c7f5b4cced1b8d3c00 /hcid/dbus-sdp.c
parentb60b1f7f74c2b3466f4aba638bf3cbc27c90894e (diff)
Removed '0x' from search pattern
Diffstat (limited to 'hcid/dbus-sdp.c')
-rw-r--r--hcid/dbus-sdp.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/hcid/dbus-sdp.c b/hcid/dbus-sdp.c
index f17c8c31..54e11b47 100644
--- a/hcid/dbus-sdp.c
+++ b/hcid/dbus-sdp.c
@@ -945,14 +945,9 @@ static int remote_svc_handles_conn_cb(struct transaction_context *ctxt)
DBUS_TYPE_STRING, &svc,
DBUS_TYPE_INVALID);
- if (strlen(svc) > 0) {
- /* Check if it is a service name string */
- if (str2uuid(&uuid, svc) < 0) {
- /* check if the service string is a hex */
- uint32_t uuid_hex = strtol(svc, NULL, 16);
- sdp_uuid16_create(&uuid, uuid_hex);
- }
- } else
+ if (strlen(svc) > 0)
+ str2uuid(&uuid, svc);
+ else
sdp_uuid16_create(&uuid, PUBLIC_BROWSE_GROUP);
search = sdp_list_append(0, &uuid);
@@ -987,12 +982,8 @@ DBusHandlerResult get_remote_svc_handles(DBusConnection *conn, DBusMessage *msg,
if (strlen(svc) > 0) {
/* Check if it is a service name string */
if (str2uuid(&uuid, svc) < 0) {
- /* check if the service string is a hex */
- uint32_t uuid_hex = strtol(svc, NULL, 16);
- if (!uuid_hex) {
- error("Invalid service class name");
- return error_invalid_arguments(conn, msg);
- }
+ error("Invalid service class name");
+ return error_invalid_arguments(conn, msg);
}
}