On 25 February 2011 14:04, Lasse Kunnasluoto
<[email protected]> wrote:
> On Fri, 2011-02-25 at 14:39 +0200, Andrzej Zaborowski wrote:
>> On 25 February 2011 11:39, Lasse Kunnasluoto <[email protected]> 
>> wrote:
>> > Fixes a crash when SIM Session End is received while waiting for user 
>> > response to SELECT ITEM command.
>>
>> Can you post the ofono debug log for example?  It sounds like
>> something else is wrong because stk_respond should not be called when
>> the session is ended by the card.
>
> Sure, log below.
>
> For me it looks like modem times out after 1 min if no response given. I
> don't think the session was terminated by SIM. Usually SIM cards wait
> for TERMINAL RESPONSE basically forever. SIM has no mechanism to
> terminate ongoing proactive command (well, except reset itself)

Thanks for the log.

Even if it is the modem timing out, our assumption was that no
TERMINAL RESPONSE is wanted after the timeout (*STKEND).  So I think
the following would be a better fix:

diff --git a/src/stk.c b/src/stk.c
index bc46b2f..c4e988b 100644
--- a/src/stk.c
+++ b/src/stk.c
@@ -2514,6 +2514,7 @@ static void stk_proactive_command_cancel(struct
ofono_stk *stk)
                stk_command_free(stk->pending_cmd);
                stk->pending_cmd = NULL;
                stk->cancel_cmd = NULL;
+               stk->respond_on_exit = FALSE;
        }
 }

Alternatively this line can be added in stk_request_cancel

Best regards
diff --git a/src/stk.c b/src/stk.c
index bc46b2f..c4e988b 100644
--- a/src/stk.c
+++ b/src/stk.c
@@ -2514,6 +2514,7 @@ static void stk_proactive_command_cancel(struct ofono_stk *stk)
 		stk_command_free(stk->pending_cmd);
 		stk->pending_cmd = NULL;
 		stk->cancel_cmd = NULL;
+		stk->respond_on_exit = FALSE;
 	}
 }
 
_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Reply via email to