diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2008-06-15 00:17:34 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2008-06-15 00:17:34 +0000 |
commit | 86fc487fbc0e5e6f7146a43099dc7ce1791c84f0 (patch) | |
tree | 86479ce8d7fc54c515b1aac90f960401587caef0 /xserver/config/dbus-core.c | |
parent | f629cb662c6469d23587f9dffc2352a8b6505b7b (diff) |
Update to xserver 1.4.2. Tested by landry@, ckuethe@, jsing@ mbalmer@.
Diffstat (limited to 'xserver/config/dbus-core.c')
-rw-r--r-- | xserver/config/dbus-core.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/xserver/config/dbus-core.c b/xserver/config/dbus-core.c index 28881596f..9cf153076 100644 --- a/xserver/config/dbus-core.c +++ b/xserver/config/dbus-core.c @@ -76,7 +76,7 @@ teardown(void) struct config_dbus_core_hook *hook; if (bus_info.timer) { - TimerCancel(bus_info.timer); + TimerFree(bus_info.timer); bus_info.timer = NULL; } @@ -87,7 +87,8 @@ teardown(void) dbus_connection_unref(bus_info.connection); RemoveBlockAndWakeupHandlers(block_handler, wakeup_handler, &bus_info); - RemoveGeneralSocket(bus_info.fd); + if (bus_info.fd != -1) + RemoveGeneralSocket(bus_info.fd); bus_info.fd = -1; bus_info.connection = NULL; @@ -115,6 +116,8 @@ message_filter(DBusConnection *connection, DBusMessage *message, void *data) bus_info.connection = NULL; teardown(); + if (bus_info.timer) + TimerFree(bus_info.timer); bus_info.timer = TimerSet(NULL, 0, 1, reconnect_timer, NULL); return DBUS_HANDLER_RESULT_HANDLED; @@ -185,6 +188,7 @@ static CARD32 reconnect_timer(OsTimerPtr timer, CARD32 time, pointer arg) { if (connect_to_bus()) { + TimerFree(bus_info.timer); bus_info.timer = NULL; return 0; } |