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>
This commit is contained in:
parent
52d6a1e832
commit
3caf671ed2
|
@ -43,7 +43,7 @@ struct dbus_core_info {
|
||||||
OsTimerPtr timer;
|
OsTimerPtr timer;
|
||||||
struct dbus_core_hook *hooks;
|
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);
|
static CARD32 reconnect_timer(OsTimerPtr timer, CARD32 time, void *arg);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user