The code in connect_hook incorrectly checks for dbus_bus_request_name failure.
The dbus_bus_request_name error indicator is -1, not 0. This leads
to subsequent assertion failure in libdbus.
(cherry picked from commit ddce48ede0)
If message iterator cannot be created, the caller didn't supply any
parameters. Return BadValue, instead of dying a horrible death while being
stuck in an endless loop.
(cherry picked from commit 0fcde83d94)
Don't use our DBusError for property getting, because we simply don't care:
this fixes D-Bus error spew to stderr. Thanks Michel Dänzer for debugging
and testing.
Add support for HAL-based hotplugging, in which we just get the list of
input devices and properties from HAL. Requires an FDI which is not yet
in mainline HAL.
Use uint32s instead of int32s where practical, and add an API version
request. Also, try to return all devices added, not just the first,
and box device arguments.
Break up D-Bus into two components: a D-Bus core that can be used by any
part of the server (for the moment, just the D-Bus hotplug API, and the
forthcoming HAL hotplug API), and the old D-Bus hotplug API.
Just unref the connection instead of explicitly closing it (thanks, Rob
McQueen).
Add a commented-out unregister_object_path call: unfortunately, when we
call it, libdbus segfaults. But if we don't unregister the path, we
can't register it again. So regenerations are broken either way, but a
little less violently like this.
Add replies, which use standard X error values, to the two currently-supported
input configuration requests.
Document the D-BUS API we use.
Make sure we free everything when we encounter an error.
Add a _source option to all incoming requests, noting that it came from a
client.
Reject all requests to add a device where an option name contains an
underscore.
Fix a small race whereby you could remove a device while events from it
were still in the queue, by calling ProcessInputEvents immediately before
RemoveDevice, to (hopefully) flush the event queue.
Also move LookupDeviceIntRec into the DIX, and add InputOption type, and
NewInputDeviceRequest prototype (DIX requests DDX to add a device). Does not
link without an implemented NIDR.