Hi John,

On 04/22/2016 08:07 AM, John Ernberg wrote:
From: John Ernberg <[email protected]>

This resolves a crash that can happen when a e.g. usb modem is removed.
---
  src/modem.c | 3 +++
  1 file changed, 3 insertions(+)

diff --git a/src/modem.c b/src/modem.c
index a89fa48..4968839 100644
--- a/src/modem.c
+++ b/src/modem.c
@@ -2071,6 +2071,9 @@ static void modem_unregister(struct ofono_modem *modem)
        if (modem->powered == TRUE)
                set_powered(modem, FALSE);


So in theory, set_powered calls flush_atoms...

+       if (modem->atoms)
+               flush_atoms(modem, MODEM_STATE_POWER_OFF);
+

So why is this needed?

Do you have a stack trace handy?

        __ofono_watchlist_free(modem->atom_watches);
        modem->atom_watches = NULL;



Regards,
-Denis
_______________________________________________
ofono mailing list
[email protected]
https://lists.ofono.org/mailman/listinfo/ofono

Reply via email to