summaryrefslogtreecommitdiffstats
path: root/serial
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2008-11-06 16:12:16 -0300
committerLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2008-11-06 16:12:16 -0300
commit054f044588ee84c300b11ef4d94ddc55fe170539 (patch)
tree59ea0fd443b353101454fbebc375115c69000bac /serial
parent0cd6d963d0fed972434f6d0cec0448c99bee87cb (diff)
Rename bt_string2class to bt_name2class and introduce bt_name2string.
Since bt_string2class didn't work for UUID128 in string format the name got changed to be more suggestive. bt_name2string was introduced to prevent potential use of bt_string2uuid followed with bt_uuid2string which turns to do the same conversion twice.
Diffstat (limited to 'serial')
-rw-r--r--serial/port.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/serial/port.c b/serial/port.c
index c4fa644c..1f62b5e4 100644
--- a/serial/port.c
+++ b/serial/port.c
@@ -101,8 +101,6 @@ static struct serial_port *find_port(GSList *ports, const char *pattern)
for (l = ports; l != NULL; l = l->next) {
struct serial_port *port = l->data;
- uuid_t uuid;
- uint16_t uuid16;
char *uuid_str;
int ret;
@@ -112,17 +110,7 @@ static struct serial_port *find_port(GSList *ports, const char *pattern)
if (port->dev && !strcmp(port->dev, pattern))
return port;
- /* The following steps converts a potential friendly-name to a
- * UUID-128 string and compares it with the port UUID (which is
- * also stored as a UUID-128 string */
-
- uuid16 = bt_string2class(pattern);
- if (!uuid16)
- continue;
-
- sdp_uuid16_create(&uuid, uuid16);
-
- uuid_str = bt_uuid2string(&uuid);
+ uuid_str = bt_name2string(pattern);
if (!uuid_str)
continue;