On Mon, 2015-02-09 at 11:41 +0200, pasi.sjoh...@jolla.com wrote: > From: Pasi Sjöholm <pasi.sjoh...@jollamobile.com> > > If configuration method is not always set the ConnMan > will use previously set configuration from previous > connections. > --- > plugins/ofono.c | 15 +++++++-------- > 1 file changed, 7 insertions(+), 8 deletions(-) > > diff --git a/plugins/ofono.c b/plugins/ofono.c > index fabbf7c..b79cb0c 100644 > --- a/plugins/ofono.c > +++ b/plugins/ofono.c > @@ -277,12 +277,11 @@ static void set_connected(struct modem_data *modem) > if (!service) > return; > > - if (method == CONNMAN_IPCONFIG_METHOD_FIXED || > - method == CONNMAN_IPCONFIG_METHOD_DHCP) { > - connman_service_create_ip4config(service, index); > - > - connman_network_set_ipv4_method(modem->network, method); > + connman_service_create_ip4config(service, index); > + connman_network_set_ipv4_method(modem->network, method);
So if method is off or unknown, we'd unnecessarily create and ipconfig here, right? > + if (method == CONNMAN_IPCONFIG_METHOD_FIXED || > + method == CONNMAN_IPCONFIG_METHOD_DHCP) { > setip = true; > } > > @@ -292,10 +291,10 @@ static void set_connected(struct modem_data *modem) > } > > method = modem->context->ipv6_method; > - if (method == CONNMAN_IPCONFIG_METHOD_AUTO) { > - connman_service_create_ip6config(service, index); > - connman_network_set_ipv6_method(modem->network, method); > + connman_service_create_ip6config(service, index); > + connman_network_set_ipv6_method(modem->network, method); And here too? > + if (method == CONNMAN_IPCONFIG_METHOD_AUTO) { > setip = true; > } > Cheers, Patrik _______________________________________________ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman