[MERGED] osmo-gsm-tester[master]: modem: reset cancellable after cancelling dbus methods
Pau Espin Pedrol
gerrit-no-reply at lists.osmocom.org
Fri Oct 6 10:08:00 UTC 2017
Pau Espin Pedrol has submitted this change and it was merged.
Change subject: modem: reset cancellable after cancelling dbus methods
modem: reset cancellable after cancelling dbus methods
I first wanted to use "reset" method, but according to :
"The recommended practice is to drop the reference to a
cancellable after cancelling it, and let it die with the outstanding
async operations. You should create a fresh cancellable for further
Pretty weird that in other parts of documentation it still says that it
can be used for concurrent events.
1 file changed, 2 insertions(+), 0 deletions(-)
Pau Espin Pedrol: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/osmo_gsm_tester/ofono_client.py b/src/osmo_gsm_tester/ofono_client.py
index 30e2b55..e301ed6 100644
@@ -502,6 +502,8 @@
# Cancel op is applied as a signal coming from glib mainloop, so we
# need to run it and wait for the callbacks to handle cancellations.
+ # once it has been triggered, create a new one for next operation:
+ self.cancellable = Gio.Cancellable.new()
'Power the modem and put it online, power cycle it if it was already on'
To view, visit https://gerrit.osmocom.org/4145
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
More information about the gerrit-log