summaryrefslogtreecommitdiff
path: root/tests/src
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2014-09-03 17:21:46 +1200
committerRobert Ancell <robert.ancell@canonical.com>2014-09-03 17:21:46 +1200
commit443a3d8c1ff66a9bca1c73f08818b0288fb5af53 (patch)
treea89ea9c079c3db0839d286897a9b7e54f266116b /tests/src
parent0dce92703e16ec3c84d0153c1b655147b15473b1 (diff)
downloadlightdm-443a3d8c1ff66a9bca1c73f08818b0288fb5af53.tar.gz
Revert globbing changes - there are problems with it
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/test-runner.c35
1 files changed, 7 insertions, 28 deletions
diff --git a/tests/src/test-runner.c b/tests/src/test-runner.c
index 631d299c..2dfcfd96 100644
--- a/tests/src/test-runner.c
+++ b/tests/src/test-runner.c
@@ -1451,29 +1451,10 @@ handle_login1_seat_get_property (GDBusConnection *connection,
return NULL;
}
-static gchar *
-escape_seat_id (const gchar *id)
-{
- GString *s;
- int i;
-
- s = g_string_new ("");
- for (i = 0; id[i]; i++)
- {
- if (isalnum (id[i]) || id[i] == '_')
- g_string_append_c (s, id[i]);
- else
- g_string_append_printf (s, "_%02x", id[i]);
- }
-
- return g_string_free (s, FALSE);
-}
-
static Login1Seat *
add_login1_seat (GDBusConnection *connection, const gchar *id, gboolean emit_signal)
{
Login1Seat *seat;
- gchar *escaped_id;
GError *error = NULL;
GDBusNodeInfo *login1_seat_info;
@@ -1491,6 +1472,13 @@ add_login1_seat (GDBusConnection *connection, const gchar *id, gboolean emit_sig
handle_login1_seat_get_property,
};
+ seat = g_malloc0 (sizeof (Login1Seat));
+ login1_seats = g_list_append (login1_seats, seat);
+ seat->id = g_strdup (id);
+ seat->path = g_strdup_printf ("/org/freedesktop/login1/seat/%s", seat->id);
+ seat->can_graphical = TRUE;
+ seat->can_multi_session = TRUE;
+
login1_seat_info = g_dbus_node_info_new_for_xml (login1_seat_interface, &error);
if (error)
g_warning ("Failed to parse login1 seat D-Bus interface: %s", error->message);
@@ -1498,15 +1486,6 @@ add_login1_seat (GDBusConnection *connection, const gchar *id, gboolean emit_sig
if (!login1_seat_info)
return NULL;
- seat = g_malloc0 (sizeof (Login1Seat));
- login1_seats = g_list_append (login1_seats, seat);
- seat->id = g_strdup (id);
- escaped_id = escape_seat_id (seat->id);
- seat->path = g_strdup_printf ("/org/freedesktop/login1/seat/%s", escaped_id);
- g_free (escaped_id);
- seat->can_graphical = TRUE;
- seat->can_multi_session = TRUE;
-
g_dbus_connection_register_object (connection,
seat->path,
login1_seat_info->interfaces[0],