Seems to be this:
i) When the modem is first powered on, service discovery takes some time (more than 5 seconds)
ii) The service discovery timeout fires before the QMI request returns so discover_reply gets called before discover_callback and things get cleaned up
iii) Then the QMI request returns and discover_callback gets called even though the request has timed out in ii)
...and this is where things go wrong because the userdata pointer to discover_callback is probably no longer valid.
How do we handle the QMI request returning a _late_ response, i.e. after it technically has timed out? I'll dig a bit more...
When I look at my personal patches, it seems I've already seen that. Please find attached the patch I currently have in my setup on this subject.
_______________________________________________ ofono mailing list email@example.com https://lists.ofono.org/mailman/listinfo/ofono