Compare commits
4 Commits
citadel
...
matthiasc/
Author | SHA1 | Date | |
---|---|---|---|
|
39f974358c | ||
|
0fb98606ef | ||
|
dd0d5a757c | ||
|
0bbb226faf |
10
src/main.c
10
src/main.c
@ -68,12 +68,14 @@ shell_dbus_acquire_name (GDBusProxy *bus,
|
|||||||
NULL, /* cancellable */
|
NULL, /* cancellable */
|
||||||
&error)))
|
&error)))
|
||||||
{
|
{
|
||||||
g_printerr ("failed to acquire %s: %s\n", name, error->message);
|
g_printerr ("failed to acquire %s: %s\n", name, error ? error->message : "");
|
||||||
|
g_clear_error (&error);
|
||||||
if (!fatal)
|
if (!fatal)
|
||||||
return;
|
return;
|
||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
g_variant_get (request_name_variant, "(u)", request_name_result);
|
g_variant_get (request_name_variant, "(u)", request_name_result);
|
||||||
|
g_variant_unref (request_name_variant);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -130,6 +132,12 @@ shell_dbus_init (gboolean replace)
|
|||||||
NULL, /* cancellable */
|
NULL, /* cancellable */
|
||||||
&error);
|
&error);
|
||||||
|
|
||||||
|
if (!bus)
|
||||||
|
{
|
||||||
|
g_printerr ("Failed to get a session bus proxy: %s", error->message);
|
||||||
|
exit (1);
|
||||||
|
}
|
||||||
|
|
||||||
request_name_flags = G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT;
|
request_name_flags = G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT;
|
||||||
if (replace)
|
if (replace)
|
||||||
request_name_flags |= DBUS_NAME_FLAG_REPLACE_EXISTING;
|
request_name_flags |= DBUS_NAME_FLAG_REPLACE_EXISTING;
|
||||||
|
Loading…
Reference in New Issue
Block a user