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);
+ if (modem->atoms)
+ flush_atoms(modem, MODEM_STATE_POWER_OFF);
+
__ofono_watchlist_free(modem->atom_watches);
modem->atom_watches = NULL;
--
1.9.1
_______________________________________________
ofono mailing list
[email protected]
https://lists.ofono.org/mailman/listinfo/ofono