SHA256
1
0
forked from pool/systemd
systemd/timedated-donot-close-bogus-dbus-connection.patch

37 lines
1.6 KiB
Diff
Raw Normal View History

commit b779821b8fdcb3f2bdd0c362bceaae3c76ed9678
Author: Shawn Landden <shawnlandden@gmail.com>
Date: Mon Dec 3 00:50:55 2012 +0000
timedated: do not incorrectly close non-opened dbus connection
Fix the fallowing error when no system dbus available:
Failed to get system D-Bus connection: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
process 14920: arguments to dbus_connection_close() were incorrect, assertion "connection != NULL" failed in file ../../dbus/dbus-connection.c line 2889.
This is normally a bug in some application using the D-Bus library.
process 14920: arguments to dbus_connection_unref() were incorrect, assertion "connection != NULL" failed in file ../../dbus/dbus-connection.c line 2776.
This is normally a bug in some application using the D-Bus library.
Index: systemd-195/src/timedate/timedated.c
===================================================================
--- systemd-195.orig/src/timedate/timedated.c
+++ systemd-195/src/timedate/timedated.c
@@ -943,7 +943,7 @@ static int connect_bus(DBusConnection **
if (!bus) {
log_error("Failed to get system D-Bus connection: %s", bus_error_message(&error));
r = -ECONNREFUSED;
- goto fail;
+ goto fail2;
}
dbus_connection_set_exit_on_disconnect(bus, FALSE);
@@ -975,7 +975,7 @@ static int connect_bus(DBusConnection **
fail:
dbus_connection_close(bus);
dbus_connection_unref(bus);
-
+fail2:
dbus_error_free(&error);
return r;