Make _dbus_connection_get_next_client_serial() public
@rhabacker
Submitted by Ralf Habacker Assigned to Ralf Habacker @rhabacker
Description
Created attachment 121759 sequence diagram showing recent state
While working on https://bugreports.qt.io/browse/QTBUG-44490, which provides access to 'serial' and 'reply serial to' in QtDBus, an issue getting the message serial in multi threaded raised up.
With recent dbus implementation the message serial is only available after sending the dbus message with one of the dbus_connection_send... functions.
In QtDBus the message is constructed in one thread and send from another. Dumping the message serial in the first thread immediatly after triggering send may return 0, because the message has not been send yet. (see sequence diagram 'current-state.png')
From my observations a solution to this issue (and may be similar in multithreaded environments) would be by constructing a dbus message including a reserved serial. This could be done by making _dbus_connection_get_next_client_serial() public. (see with-client_serial.png)
Attachment 121759, "sequence diagram showing recent state":
Version: git master