[Bugs] #3800 sugar UNSP: 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.

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Sun Aug 12 17:00:52 EDT 2012


#3800: 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.
------------------------------------------+---------------------------------
    Reporter:  ajay_garg                  |          Owner:  erikos                     
        Type:  defect                     |         Status:  new                        
    Priority:  Unspecified by Maintainer  |      Milestone:  Unspecified by Release Team
   Component:  sugar                      |        Version:  Git as of bugdate          
    Severity:  Unspecified                |       Keywords:                             
Distribution:  Unspecified                |   Status_field:  Unconfirmed                
------------------------------------------+---------------------------------
 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.

-- 
Ticket URL: <http://bugs.sugarlabs.org/ticket/3800>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list