mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-05 10:38:08 +01:00
GDBus: Use abstract namespace in test cases to avoid littering all over /tmp
Signed-off-by: David Zeuthen <davidz@redhat.com>
This commit is contained in:
parent
7036415cc1
commit
a35eb70471
@ -28,6 +28,8 @@
|
|||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include <gio/gio.h>
|
||||||
|
|
||||||
#include "gdbus-sessionbus.h"
|
#include "gdbus-sessionbus.h"
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------------------------------------- */
|
||||||
@ -304,8 +306,10 @@ session_bus_get_temporary_address (void)
|
|||||||
{
|
{
|
||||||
if (temporary_address == NULL)
|
if (temporary_address == NULL)
|
||||||
{
|
{
|
||||||
/* TODO: maybe use a more random name etc etc */
|
gchar *guid;
|
||||||
temporary_address = g_strdup_printf ("unix:path=/tmp/g-dbus-tests-pid-%d", getpid ());
|
guid = g_dbus_generate_guid ();
|
||||||
|
temporary_address = g_strdup_printf ("unix:abstract=/tmp/g-dbus-tests-pid-%d-uuid-%s", getpid (), guid);
|
||||||
|
g_free (guid);
|
||||||
}
|
}
|
||||||
|
|
||||||
return temporary_address;
|
return temporary_address;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user