From: Pasi Sjöholm <[email protected]>
Method must not be reset from _OFF when disconnecting
but only through Protocol-message handling.
---
plugins/ofono.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/plugins/ofono.c b/plugins/ofono.c
index b79cb0c..d18130e 100644
--- a/plugins/ofono.c
+++ b/plugins/ofono.c
@@ -330,11 +330,15 @@ static void set_disconnected(struct modem_data *modem)
if (modem->context) {
g_free(modem->context->ipv4_nameservers);
modem->context->ipv4_nameservers = NULL;
- modem->context->ipv4_method = CONNMAN_IPCONFIG_METHOD_UNKNOWN;
+ if (modem->context->ipv4_method != CONNMAN_IPCONFIG_METHOD_OFF)
+ modem->context->ipv4_method =
+ CONNMAN_IPCONFIG_METHOD_UNKNOWN;
g_free(modem->context->ipv6_nameservers);
modem->context->ipv6_nameservers = NULL;
- modem->context->ipv6_method = CONNMAN_IPCONFIG_METHOD_UNKNOWN;
+ if (modem->context->ipv6_method != CONNMAN_IPCONFIG_METHOD_OFF)
+ modem->context->ipv6_method =
+ CONNMAN_IPCONFIG_METHOD_UNKNOWN;
}
}
--
2.1.0
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman