38c8db8293
Fixes #3230. The static `bus` global was only ever checked for non-NULL, not for whether the underlying connection was still alive. If ibus disconnected (daemon restart, stale socket) or the initial connect attempt failed, `bus` was left set to a dead/freed connection, so every later call to xrdp_input_unicode_init() took the "already initialized" fast path and operated on it. - Null out bus/g_engine in the "disconnected" signal handler instead of leaving them dangling after g_object_unref(). - Check ibus_bus_is_connected() before trusting a cached bus, and tear down + reconnect if it's stale. - Unref and clear bus on a failed connect attempt instead of leaving it set. - Guard the unrefs in xrdp_input_unicode_destroy() now that bus/ g_engine can legitimately already be NULL.