dbus-session-manager: Generate session IDs that one doesn't need to escape
This makes it easier to deal with in test cases that uses g_shell_parse_argv(). Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4210>
This commit is contained in:
parent
c250f602bd
commit
5708c6c5d1
@ -287,14 +287,11 @@ generate_session_id (MetaDbusSessionManager *session_manager)
|
||||
{
|
||||
MetaDbusSessionManagerPrivate *priv =
|
||||
meta_dbus_session_manager_get_instance_private (session_manager);
|
||||
g_autoptr (GRand) rand = NULL;
|
||||
char *session_id;
|
||||
|
||||
rand = g_rand_new ();
|
||||
|
||||
while (TRUE)
|
||||
{
|
||||
session_id = meta_generate_random_id (rand, 32);
|
||||
session_id = g_uuid_string_random ();
|
||||
if (g_hash_table_lookup (priv->sessions, session_id))
|
||||
g_free (session_id);
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user