Hi Martin,
> I have done some change according to your suggestion and think of Ethernet
> case.
> Please review the patch:
> diff --git a/include/network.h b/include/network.h
> index 78e5c0e..15409bd 100644
> --- a/include/network.h
> +++ b/include/network.h
> @@ -80,6 +80,8 @@ extern connman_bool_t connman_network_get_remember(struct
> connman_network *netwo
>
> extern int connman_network_connect(struct connman_network *network);
>
> +extern int connman_network_disconnect(struct connman_network *network);
> +
> extern int connman_network_set_string(struct connman_network *network,
> const char *key, const char *value);
> extern const char *connman_network_get_string(struct connman_network
> *network,
> diff --git a/plugins/dhclient.c b/plugins/dhclient.c
> index 7e5e6d0..323e49e 100644
> --- a/plugins/dhclient.c
> +++ b/plugins/dhclient.c
> @@ -44,6 +44,7 @@ struct dhclient_task {
> GPid pid;
> int ifindex;
> gchar *ifname;
> + struct connman_network *network;
> struct connman_element *element;
> };
>
> @@ -147,6 +148,10 @@ static int dhclient_probe(struct connman_element
> *element)
> task->ifindex = element->index;
> task->ifname = inet_index2name(element->index);
> task->element = element;
> + if(element->parent->type == CONNMAN_ELEMENT_TYPE_NETWORK)
> + task->network = element->parent->network;
> + else
> + task->network = NULL;
this is not good enough. We don't know that the driver attached to the
network type is the default one. ConnMan would allow to override it. We
don't use it, but it is possible.
So I pushed three patches that should fix this the right way and
introduce the ground work for generic error reporting. Can you check if
this works for you?
Regards
Marcel
_______________________________________________
connman mailing list
[email protected]
https://lists.moblin.org/mailman/listinfo/connman