Ticket #3800 (new defect)

Opened 9 months ago

Last modified 2 weeks ago

In "My Settings" -> "ModemConfiguration", convert the procedure to process the results of "connection.get_secrets('gsm', _secrets_cb, _secrets_err_cb)" from pseudo-asynchronous to asynchronous.

Reported by: ajay_garg Owned by: erikos
Priority: Unspecified by Maintainer Milestone: Unspecified by Release Team
Component: sugar Version: Git as of bugdate
Severity: Unspecified Keywords:
Cc: quozl, ajay_garg Distribution/OS: Unspecified
Bug Status: Unconfirmed

Description

In the method "get_modem_settings()", we call "connection.get_secrets('gsm', _secrets_cb, _secrets_err_cb)". This is an asynchronous call.

As of now, we busy wait, till the specified "result" callback is called (which in this case happens to be "def _secrets_cb(secrets)". After this is called, we return the modem-settings.

Instead of busy waiting, pass a callabck from the callee function. Thereafter, when "def _secrets_cb(secrets)" is hit, execute this callback function, passing the modem-settings.

Change History

Changed 9 months ago by ajay_garg

  • cc ajay_garg added

Patch (for sugar 0.98, mainline) at ::
 http://patchwork.sugarlabs.org/patch/1643/

Changed 9 months ago by ajay_garg

  • cc quozl added

Version-2 Patch (for sugar 0.98, mainline) at ::
 http://patchwork.sugarlabs.org/patch/1645/

Changes of version-2 over version-1 ::::
=======================================

a)
Fixed a typo in the description.

Thanks James Cameron :)

b)
Removed extraneous comments.

Thanks James Cameron :)

Changed 2 weeks ago by walter

Not sure why this never landed, but a similar patch has been submitted here:

 https://github.com/sugarlabs/sugar/pull/53

Note: See TracTickets for help on using tickets.