GNOME Bugzilla – Bug 783499
[review] rework async D-Bus calls for WPS (Wi-Fi) [th/wifi-wps-chain-async-bgo783499]
Last modified: 2017-06-14 09:32:58 UTC
Please review. Copy commit message: supplicant: chain asynchronous requests for WPS Don't have pending asynchronous requests in parallel, like setting "ProcessCredentials" and "Start", or "Cancel" and "Start". Instead, "Start" is only scheduled after "ProcessCredentials" completed and "ProcessCredentials" is only scheduled after "Cancel" completed. Also, handle the async response of these requests. For one, to achive the chaining mentioned above and to log what happens and possible errors. Upon new enrollment, a previously created GDBusProxy is now reused, where the first operation is to Cancel the previous action. Also, consistently <trace> log what is happening. Not doing all of this is less lines of code. It's also simpler, and faster. But in my opinion, it is (usually) better to check and wait for return values, instead of firing off async requests uncontrolled. It allows us to better know where we are and to log about each individual step. This also makes all operations cancellable. Undoubtedly, correctness and handling failures conflicts with simplicity in this case -- or at least: what I think is "correctness" conflicts.
LGTM
merged to master: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=49f8fc90bd2458174397c9c712c03fd35d96d5da