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 794088 - Add calls to g_simple_async_result_set_check_cancellable
Add calls to g_simple_async_result_set_check_cancellable
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: API
unspecified
Other All
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2018-03-05 15:09 UTC by Benjamin Berg
Modified: 2018-03-08 14:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add calls to g_simple_async_result_set_check_cancellable (26.40 KB, patch)
2018-03-05 15:09 UTC, Benjamin Berg
none Details | Review

Description Benjamin Berg 2018-03-05 15:09:28 UTC
If an operation is cancelled through the GCancellable, then the idiom is
that the operation is always cancelled, even if it has finished
successfully. To ensure this is the case, add calls to
g_simple_async_result_set_check_cancellable everywhere.

Without this, e.g. gnome-control-center will crash when switching away
from the power panel quickly, as the NMClient creation finishes
asynchronously and g-c-c assume that G_IO_ERROR_CANCELLED is returned to
ensure it doesn't access the now invalid user_data parameter.
Comment 1 Benjamin Berg 2018-03-05 15:09:33 UTC
Created attachment 369349 [details] [review]
Add calls to g_simple_async_result_set_check_cancellable
Comment 2 Thomas Haller 2018-03-05 16:56:42 UTC
lgtm