X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fdbus.c;h=6f43c4108e6e585083f5c43ddccc65e625a07da0;hp=af03c5746ca6dddfe4bf73fd9c443fe1d523083f;hb=7c3b203c5c69fc37c8d143851cd395cbf8920786;hpb=05feefe0fb049bb0f7c59584058ee0350462920c diff --git a/src/dbus.c b/src/dbus.c index af03c5746..6f43c4108 100644 --- a/src/dbus.c +++ b/src/dbus.c @@ -176,8 +176,8 @@ static dbus_bool_t bus_add_watch(DBusWatch *bus_watch, void *data) { } if (epoll_ctl(m->epoll_fd, EPOLL_CTL_ADD, w->fd, &ev) < 0) { - free(w); close_nointr_nofail(w->fd); + free(w); return FALSE; } @@ -236,7 +236,7 @@ static int bus_timeout_arm(Manager *m, Watch *w) { if (dbus_timeout_get_enabled(w->data.bus_timeout)) { timespec_store(&its.it_value, dbus_timeout_get_interval(w->data.bus_timeout) * USEC_PER_MSEC); - its.it_interval = its.it_interval; + its.it_interval = its.it_value; } if (timerfd_settime(w->fd, 0, &its, NULL) < 0) @@ -269,7 +269,7 @@ static dbus_bool_t bus_add_timeout(DBusTimeout *timeout, void *data) { if (!(w = new0(Watch, 1))) return FALSE; - if (!(w->fd = timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK|TFD_CLOEXEC)) < 0) + if ((w->fd = timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK|TFD_CLOEXEC)) < 0) goto fail; w->type = WATCH_DBUS_TIMEOUT; @@ -955,7 +955,8 @@ static int bus_init_private(Manager *m) { if (getpid() != 1) return 0; - if (!(m->private_bus = dbus_server_listen("unix:abstract=/org/freedesktop/systemd1/private", &error))) { + unlink("/run/systemd/private"); + if (!(m->private_bus = dbus_server_listen("unix:path=/run/systemd/private", &error))) { log_error("Failed to create private D-Bus server: %s", error.message); r = -EIO; goto fail;