summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2016-09-14 22:40:32 -0700
committerKeith Packard <keithp@keithp.com>2016-09-15 21:30:38 -0700
commit3caf671ed2a8a79856409a109355fc0f393d7aed (patch)
tree6e6f39109e742ee0203269fb4b16c2fb36167df4 /config
parent52d6a1e832a5e62289dd4f32824ae16a78dfd7e8 (diff)
config/dbus: Initialize dbus fd to -1 so teardown doesn't use fd 0
The dbus teardown code is called when the server fatal errors even if that is before dbus has ever been initialized. By statically initializing the value of bus_info.fd, we avoid calling RemoveNotifyFd on stdin. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'config')
-rw-r--r--config/dbus-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/config/dbus-core.c b/config/dbus-core.c
index 3c85ad788..6d9a3f917 100644
--- a/config/dbus-core.c
+++ b/config/dbus-core.c
@@ -43,7 +43,7 @@ struct dbus_core_info {
OsTimerPtr timer;
struct dbus_core_hook *hooks;
};
-static struct dbus_core_info bus_info;
+static struct dbus_core_info bus_info = { .fd = -1 };
static CARD32 reconnect_timer(OsTimerPtr timer, CARD32 time, void *arg);