Warning: Can't synchronize with repository "(default)" (No changeset 96d22ec3fa3ef6de3ea8dc0d7d398adc9aa071cf in the repository). Look in the Trac log for more information.

Ticket #378 (new enhancement)

Opened 4 years ago

Last modified 4 years ago

support to manually release/request resource gsm in zhone

Reported by: michael Owned by: mickey
Priority: trivial Milestone:
Component: zhone/general Version:
Keywords: Cc:

Description

example patch:

--- zhone.orig  2009-03-14 10:41:20.000000000 +0100
+++ zhone       2009-03-14 10:43:00.000000000 +0100
@@ -1903,6 +1903,13 @@
         id = int( source.split( "_" )[-1] )
         if( id == 5 ):
           os.system("halt")
+        if( id == 3 ):
+          if( dbus_object.usage_iface.GetResourceState("GSM") ):
+            self.main.agents["usage"].release("GSM")
+            self.main.groups["main"].targets["phone"] = False
+          else:
+            self.main.agents["usage"].request("GSM")
+        self.main.transition_to(self.parent_name)
         if( id == 0 ):
           fp = os.popen("sleep 5 && \
                          n=/tmp/scap$$.png && \
@@ -1929,6 +1936,10 @@

         self.part_text_set( "label_main_list_0", _("Take screenshot") )
         self.part_text_set( "label_sub_list_0", _("and upload to http://scap.linuxtogo.org") )
+        if( dbus_object.usage_iface.GetResourceState("GSM") ):
+          self.part_text_set( "label_main_list_3", _("Release Resource GSM") )
+        else:
+          self.part_text_set( "label_main_list_3", _("Request Resource GSM") )
         self.part_text_set( "label_main_list_5", _("Exit") )
         self.part_text_set( "label_sub_list_5", _("Stop and exit Zhone") )

Attachments

manually-release-request-gsm-resource.patch (1.3 KB) - added by michael 4 years ago.

Change History

comment:1 Changed 4 years ago by daniel

Hmm, what happens if you release and request GSM again? Does network registration (including PIN entry) still work? If so I see no reason not to apply this patch.

comment:2 Changed 4 years ago by michael

Yes, network registration including PIN entry work.

comment:3 Changed 4 years ago by mickey

Looks good. Please attach this patch and I'll apply it.

Changed 4 years ago by michael

comment:4 Changed 4 years ago by michael

done.

Note: See TracTickets for help on using tickets.