Opened 9 years ago

Closed 8 years ago

#3800 closed defect (invalid)

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
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 (4)

comment:1 Changed 9 years ago by ajay_garg

  • Cc ajay_garg added

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

comment:2 Changed 9 years 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 :)

comment:3 Changed 8 years ago by walter

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

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

comment:4 Changed 8 years ago by dnarvaez

  • Resolution set to invalid
  • Status changed from new to closed

The pull request seems unrelated. Please submit a pull request with this patch.

Note: See TracTickets for help on using tickets.