31e4df6760
When an asynchronous method call failed with an exception, the code DBusResult got destructed first before handling the exception and then sent a generic, uninformative error back to the caller. A test demonstrating that for the PIM Manager SetPeer() with an invalid UID be committed separately. To fix this, the DBusResult must know whether it is really responsible for replying to the method message. The method call handlers themselves do not know whether any of their parameters is a DBusResult, so we have to activate the automatic reply indirectly, via a guard instance with the same life time as the handler. When the guard destructs, it can check whether the handler has replied, because the handler then clears the message pointers. If it hasn't, the DBusResult becomes the owner of the message. For this to work, an extra try/catch block is necessary. Otherwise exception handling would still occur too late, at a time when the guard is gone and the DBusResult has sent the generic error. Some other classes had to be adapted to allow for this extra level of indirection. While doing so, another bug was found. Retrieving the interface and member used when calling a method returned the path instead, due to a cut-and-paste error. Fixed. Not used in practice. |
||
---|---|---|
.. | ||
test | ||
.gitignore | ||
gdbus-cxx-bridge.cpp | ||
gdbus-cxx-bridge.h | ||
gdbus-cxx.h | ||
gdbusxx.am | ||
README |
This is a C++ wrapper for the GLib GDBus d-bus implementation. SyncEvolution also includes a wrapper for another library named gdbus which originated in the Bluez project. This implementation has been included in-tree and getting and sending patches is a somewhat automated process. The plan is to drop the in-tree, Bluez gdbus as soon as Debian stable and Ubuntu LTS both support a GLib >= 2.26 (the version first to include GDBus). Until this happens we'll have to keep the in-tree one around. In order to make our lives easier, both implementation should have the same interface.