mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-11 04:53:54 +01:00
Print debug info if D-Bus connection is closed due to an error
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
parent
be3defc9cd
commit
5a858846f7
@ -82,11 +82,24 @@ zathura_dbus_init(ZathuraDbus* dbus)
|
|||||||
priv->registration_id = 0;
|
priv->registration_id = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gdbus_connection_closed(GDBusConnection* UNUSED(connection),
|
||||||
|
gboolean UNUSED(remote_peer_vanished), GError* error, void* UNUSED(data))
|
||||||
|
{
|
||||||
|
if (error != NULL) {
|
||||||
|
girara_debug("D-Bus connection closed: %s", error->message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
bus_acquired(GDBusConnection* connection, const gchar* name, void* data)
|
bus_acquired(GDBusConnection* connection, const gchar* name, void* data)
|
||||||
{
|
{
|
||||||
girara_debug("Bus acquired at '%s'.", name);
|
girara_debug("Bus acquired at '%s'.", name);
|
||||||
|
|
||||||
|
/* register callback for GDBusConnection's closed signal */
|
||||||
|
g_signal_connect(G_OBJECT(connection), "closed",
|
||||||
|
G_CALLBACK(gdbus_connection_closed), NULL);
|
||||||
|
|
||||||
ZathuraDbus* dbus = data;
|
ZathuraDbus* dbus = data;
|
||||||
private_t* priv = GET_PRIVATE(dbus);
|
private_t* priv = GET_PRIVATE(dbus);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user