[pkg-fso-commits] [SCM] freesmartphone.org demo GUI branch, master, updated. milestone5-7-gd654b3d
Daniel Willmann
daniel at totalueberwachung.de
Tue Jul 21 10:56:09 UTC 2009
The following commit has been merged in the master branch:
commit 9c204f11bfc37d388c44acf639abb124fa832ab0
Author: Daniel Willmann <daniel at totalueberwachung.de>
Date: Sun Mar 1 16:07:22 2009 +0100
Remove timer that automatically sends unsent messages
This was built into zhone at a time where sending SMS was flaky at best
and so resending messages that failed to send was a necessary evil.
Now this is not the case any more and this "feature" does more evil than
it helps. If anything we need a watchdog that keeps trying to send that
particular message until it has been sent successfully.
diff --git a/src/zhone b/src/zhone
index eaf6fe6..709138c 100755
--- a/src/zhone
+++ b/src/zhone
@@ -335,27 +335,12 @@ class pyphone_sms(edje_group):
self.page = 0
self.selected = None
self.newindex = None
- self.senderTimer = ecore.timer_add( 60, self.processUnsentMessages )
self.part_text_set( "label_action_open", _("open") )
- def processUnsentMessages( self ):
- if not dbus_object.gsm_device_obj:
- return True
-
- logger.info( "checking for unsent messages" )
- dbus_object.gsm_sim_iface.RetrieveMessagebook( "unsent", reply_handler=self.cbReceiveUnsentReply, error_handler=self.cbReceiveUnsentError )
-
- return True # call me again
-
- def cbReceiveUnsentReply( self, messages ):
- for message in messages:
- index, status, number, content, features = message
- logger.info( "trying to send message w/ index %d..." % index )
- dbus_object.gsm_sim_iface.SendStoredMessage( index, reply_handler=self.cbSendReply, error_handler=self.cbSendError )
-
- def cbReceiveUnsentError( self, e ):
- logger.info( "did not receive any unsent messages: %s" % e )
+ def sendMessage( self, index ):
+ logger.info( "trying to send message w/ index %d..." % index )
+ dbus_object.gsm_sim_iface.SendStoredMessage( index, reply_handler=self.cbSendReply, error_handler=self.cbSendError )
def cbSendReply( self, reference, timestamp ):
logger.info( "sent message successfully w/ reference number %d (timestamp: %s)" % ( reference, timestamp ) )
@@ -365,7 +350,7 @@ class pyphone_sms(edje_group):
def cbStoreReply( self, result ):
logger.info( "stored message lives at SIM position %d" % result )
- self.processUnsentMessages()
+ self.sendMessage( result )
if not self.busy:
dbus_object.gsm_sim_iface.RetrieveMessagebook(
"all",
--
freesmartphone.org demo GUI
More information about the pkg-fso-commits
mailing list