Hi,
- connman_agent_cancel(service);
>+ __connman_wispr_stop(service);
Just adding __connman_wispr_stop() should do the trick here.
It could. However, if connman_agent_cancel() must be invoked every
time __connman_wispr_stop() is called then it should be impossible to
call __connman_wispr_stop() without calling connman_agent_cancel().
Otherwise crashes likes this will keep happening. This one cost me at
least a day of work. I don't want to do it again.
You are assuming that agent and wispr are tight together, which is not
exactly true. Link is indirect.
If the logic is broken, it will be in service.c: that one starts wispr
(no matter whatever agent
request is running or not), wispr then might start an agent request
(browser stuff): still the request
is tighten to service. Thus it's always up to service to cancel any
agent request.
There is not much place where __connman_wispr_stop() is called in service.c
And actually, what your patch does is calling it earlier than in
service_indicate_state() with state
CONNMAN_SERVICE_STATE_DISCONNECT as it is done currently. Which I think
you are right here.
So a proper patch would be to remove this call in
service_indicate_state() and put the one you
want in __connman_service_disconnect()
Also, it is called in service_free() but not connman_agent_cancel(),
which in this case might be
another side of the bug. Adding connman_agent_cancel() here would be
relevant I guess.
Not sure if that can be easily tested though.
Verify that but I think it looks like the proper way to do it.
Nice catch anyway
Tomasz
_______________________________________________
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman