Hi,

+++ b/src/dhcp.c
@@ -459,7 +459,8 @@ static void lease_available_cb(GDHCPClient *dhcp_client, gpointer user_data)
          __connman_ipconfig_set_gateway(dhcp->ipconfig, gateway);
      }
  -    if (!apply_lease_available_on_network(dhcp_client, dhcp))
+    if (dhcp->network
+        && !apply_lease_available_on_network(dhcp_client, dhcp))
          return;

Indeed, but do the test in apply_lease_available_on_network() preferably.
just a: if (!dhcp->network)
                return true;
Here is my understanding:
1 From the name of the function, return "true" seemed to mean that apply lease available on network successful.

Don't interpret this, this function is just here because of my refactorization of dhcp.c "On network" it will try to apply something yes: so it can return true or false in this specific case. If there is no network is silently make the function to poss, so returning true.

Exactly as apply_dhcp_invalidate_on_network() does.

Tomasz
_______________________________________________
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

Reply via email to