[pkg-fso-commits] [SCM] FSO frameworkd Debian packaging branch, debian, updated. upstream/0.9.5.5-717-g0f98819

Michael 'Mickey' Lauer mickey at vanille-media.de
Sat Aug 6 08:19:43 UTC 2011


The following commit has been merged in the debian branch:
commit 4e20053601d1f1d108ed959b4a62636c20e0a34a
Author: Michael 'Mickey' Lauer <mickey at vanille-media.de>
Date:   Thu Apr 15 17:24:40 2010 +0200

    ophoned: use lower case comparison for call status
    
    This should fix interoperability with fsogsmd

diff --git a/framework/subsystems/ophoned/gsm.py b/framework/subsystems/ophoned/gsm.py
index 9c18d2b..b52c066 100644
--- a/framework/subsystems/ophoned/gsm.py
+++ b/framework/subsystems/ophoned/gsm.py
@@ -15,7 +15,7 @@ class GSMProtocol(protocol.Protocol):
     def name(self):
         """The name of this protocol"""
         return 'GSM'
-    
+
     def __init__(self, phone):
         super(GSMProtocol, self).__init__(phone)
         # We create all the interfaces to GSM/Device
@@ -24,7 +24,7 @@ class GSMProtocol(protocol.Protocol):
             self.gsm.connect_to_signal('CallStatus', self.on_call_status)
         except Exception, e:
             raise protocol.ProtocolUnusable(e.message)
-        
+
         self.calls_by_id = {} # This will contain a list of all the created calls
 
     @helpers.exceptionlogger
@@ -32,9 +32,9 @@ class GSMProtocol(protocol.Protocol):
         """This method is called every time ogsmd emmits a status change"""
         # First we convert the arguments into python values
         id = int(id)
-        status = str(status)
+        status = str(status).lower()
         logger.debug("call_status: %d %s %s", id, status, properties)
-        
+
         # If the call is incoming, we create a new call object for this call and notify the phone service
         # else, we dispatch the signal to the apropriate call object
         if status in ['incoming', 'outgoing']:
@@ -58,9 +58,9 @@ class GSMProtocol(protocol.Protocol):
         def __init__(self, protocol, handle, peer):
             super(GSMProtocol.Call, self).__init__(protocol, handle, peer)
             self.gsm_id = None  # Used to identify the call by the gsm protocole
-            
+
         def on_call_status(self, status, properties ):
-            status = str(status)
+            status = str(status).lower()
             if status == 'outgoing':
                 self.Outgoing()
             elif status == 'active':
@@ -77,18 +77,18 @@ class GSMProtocol(protocol.Protocol):
         def Initiate(self, dbus_ok, dbus_error):
             """Initiate the call"""
             super(GSMProtocol.Call, self).Initiate()
-            
+
             def on_initiate(id):
                 self.gsm_id = id
                 self.protocol.calls_by_id[self.gsm_id] = self
                 dbus_ok(self.status)
-                
+
             self.gsm_id = self.protocol.gsm.Initiate(
                 self.id, "voice",
                 reply_handler = on_initiate, error_handler = dbus_error
             )
             return ''
-            
+
         # We make the call asynchronous, because we can't block the framwork mainloop on it !
         @dbus.service.method(
             'org.freesmartphone.Phone.Call', in_signature='', out_signature='s',
@@ -98,13 +98,13 @@ class GSMProtocol(protocol.Protocol):
             """Activate the call"""
             def on_activate():
                 dbus_ok(super(GSMProtocol.Call, self).Activate())
-            
+
             self.protocol.gsm.Activate(
                 self.gsm_id,
                 reply_handler = on_activate, error_handler = dbus_error
             )
             return ''
-        
+
         # We make the call asynchronous, because we can't block the framwork mainloop on it !
         @dbus.service.method(
             'org.freesmartphone.Phone.Call', in_signature='', out_signature='s',
@@ -114,11 +114,11 @@ class GSMProtocol(protocol.Protocol):
             """Release the call"""
             def on_release():
                 dbus_ok(super(GSMProtocol.Call, self).Release())
-            
+
             if self.status != 'Released':   # We add this check so that we can release a call several time
                 self.protocol.gsm.Release(self.gsm_id, reply_handler = on_release, error_handler = dbus_error)
             return ''
-            
+
         def Released(self):
             """Emited when the call is released"""
             # We can remove the call from the protocol list

-- 
FSO frameworkd Debian packaging



More information about the pkg-fso-commits mailing list