mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-26 18:41:17 +00:00
* qemud/qemud.c src/node_device_hal.c: activate DBus multithreading
to avoid random crashes in the daemon, patch by Daniel Berrange Daniel
This commit is contained in:
parent
14dfe93965
commit
a3ce3b1c71
@ -1,3 +1,8 @@
|
|||||||
|
Mon Mar 2 12:12:11 CET 2009 Daniel Veillard <veillard@redhat.com>
|
||||||
|
|
||||||
|
* qemud/qemud.c src/node_device_hal.c: activate DBus multithreading
|
||||||
|
to avoid random crashes in the daemon, patch by Daniel Berrange
|
||||||
|
|
||||||
Mon Mar 2 10:16:04 +0100 2009 Jim Meyering <meyering@redhat.com>
|
Mon Mar 2 10:16:04 +0100 2009 Jim Meyering <meyering@redhat.com>
|
||||||
|
|
||||||
correct a typo in a diagnostic
|
correct a typo in a diagnostic
|
||||||
|
@ -911,6 +911,10 @@ static struct qemud_server *qemudNetworkInit(struct qemud_server *server) {
|
|||||||
if (auth_unix_rw == REMOTE_AUTH_POLKIT ||
|
if (auth_unix_rw == REMOTE_AUTH_POLKIT ||
|
||||||
auth_unix_ro == REMOTE_AUTH_POLKIT) {
|
auth_unix_ro == REMOTE_AUTH_POLKIT) {
|
||||||
DBusError derr;
|
DBusError derr;
|
||||||
|
|
||||||
|
dbus_connection_set_change_sigpipe(FALSE);
|
||||||
|
dbus_threads_init_default();
|
||||||
|
|
||||||
dbus_error_init(&derr);
|
dbus_error_init(&derr);
|
||||||
server->sysbus = dbus_bus_get(DBUS_BUS_SYSTEM, &derr);
|
server->sysbus = dbus_bus_get(DBUS_BUS_SYSTEM, &derr);
|
||||||
if (!(server->sysbus)) {
|
if (!(server->sysbus)) {
|
||||||
@ -919,6 +923,7 @@ static struct qemud_server *qemudNetworkInit(struct qemud_server *server) {
|
|||||||
dbus_error_free(&derr);
|
dbus_error_free(&derr);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
dbus_connection_set_exit_on_disconnect(server->sysbus, FALSE);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -685,6 +685,9 @@ static int halDeviceMonitorStartup(void)
|
|||||||
nodeDeviceLock(driverState);
|
nodeDeviceLock(driverState);
|
||||||
|
|
||||||
/* Allocate and initialize a new HAL context */
|
/* Allocate and initialize a new HAL context */
|
||||||
|
dbus_connection_set_change_sigpipe(FALSE);
|
||||||
|
dbus_threads_init_default();
|
||||||
|
|
||||||
dbus_error_init(&err);
|
dbus_error_init(&err);
|
||||||
hal_ctx = libhal_ctx_new();
|
hal_ctx = libhal_ctx_new();
|
||||||
if (hal_ctx == NULL) {
|
if (hal_ctx == NULL) {
|
||||||
@ -696,6 +699,8 @@ static int halDeviceMonitorStartup(void)
|
|||||||
fprintf(stderr, "%s: dbus_bus_get failed\n", __FUNCTION__);
|
fprintf(stderr, "%s: dbus_bus_get failed\n", __FUNCTION__);
|
||||||
goto failure;
|
goto failure;
|
||||||
}
|
}
|
||||||
|
dbus_connection_set_exit_on_disconnect(dbus_conn, FALSE);
|
||||||
|
|
||||||
if (!libhal_ctx_set_dbus_connection(hal_ctx, dbus_conn)) {
|
if (!libhal_ctx_set_dbus_connection(hal_ctx, dbus_conn)) {
|
||||||
fprintf(stderr, "%s: libhal_ctx_set_dbus_connection failed\n",
|
fprintf(stderr, "%s: libhal_ctx_set_dbus_connection failed\n",
|
||||||
__FUNCTION__);
|
__FUNCTION__);
|
||||||
|
Loading…
Reference in New Issue
Block a user