After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 783499 - [review] rework async D-Bus calls for WPS (Wi-Fi) [th/wifi-wps-chain-async-bgo783499]
[review] rework async D-Bus calls for WPS (Wi-Fi) [th/wifi-wps-chain-async-bg...
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-06-07 07:29 UTC by Thomas Haller
Modified: 2017-06-14 09:32 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Thomas Haller 2017-06-07 07:29:21 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.
Comment 1 Beniamino Galvani 2017-06-12 07:40:46 UTC
LGTM