#309 EScheduleFailed not handled correctly in messaging module

Jukka Laurila
messaging (8)
Paul M. Aoki

PyS60 1.4.4, N95-3, V20.2.011

if a certain internal error state occurs while sending an SMS message, messaging.sms_send() becomes unusable and PyS60 must be restarted.

the messaging module tracks whether a sms_send() is in progress using an (undocumented) python global messaging._sending. the purpose is apparently to ensure that only one message is submitted to the underlying symbian API at a time.

as can be seen from src/ext/messaging/messaging.py, _sending is set True (not ready to accept messages) whenever a message is submitted, but is only set False (ready to accept messages again) in the following case:

if arg==EDeleted or arg==ESendFailed:

however, if the (undocumented) error state messaging.EScheduleFailed occurs, _sending is never cleared. this means that messaging.sms_send() can never be used again to send a message, since the check for _sending occurs near the start of the routine. the only solution (without relying on undocumented module internals) is to restart PyS60.

i believe the fix is likely to be to add EScheduleFailed to the "if" statement above, but without any documention of whether EScheduleFailed really implies the underlying API is "ready to accept messages" or not (since many of the messaging module's internal states are intermediate states rather than final states), it is impossible for me to say for sure.

Paul M. Aoki <aoki@acm.org>
Intel Research Berkeley
2150 Shattuck Ave., Ste. 1300
Berkeley, CA 94704-1347 USA


  • Paul M. Aoki
    Paul M. Aoki

    • priority: 5 --> 7