Commit 9b9b872e authored by Slava Monich's avatar Slava Monich

[ofono] Remove cellular service when network goes away

Otherwise services keep piling up when SIM cards are changing. Also,
they waste certain amount of space in the permanant storage and we
provide no way to the user to remove those.
parent 4ec90c8e
......@@ -419,12 +419,23 @@ static void modem_create_network(struct modem_data *md)
static void modem_destroy_network(struct modem_data *md)
if (md->network) {
struct connman_service *service =
if (service) {
DBG("%s", ofono_modem_path(md->modem));
connman_device_remove_network(md->device, md->network);
if (md->network) {
md->network = NULL;
if (service) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment