Hi Benoit,

> Subject: [PATCH] hso: Set modem name based on udev network interface name
> 
> Useful if you have multiple identical modems and you need a way
> to know which modem you're talking to.
> ---
>  plugins/hso.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/plugins/hso.c b/plugins/hso.c
> index 055c63b..a9fb1ba 100644
> --- a/plugins/hso.c
> +++ b/plugins/hso.c
> @@ -59,6 +59,7 @@ struct hso_data {
>  static int hso_probe(struct ofono_modem *modem)
>  {
>         struct hso_data *data;
> +       const char *interface;
> 
>         DBG("%p", modem);
> 
> @@ -68,6 +69,11 @@ static int hso_probe(struct ofono_modem *modem)
> 
>         ofono_modem_set_data(modem, data);
> 
> +       /* Set name based on network interface name */
> +       interface = ofono_modem_get_string(modem, "NetworkInterface");
> +       if (interface)
> +               ofono_modem_set_name(modem, interface);
> +
>         return 0;
>  }

the friendly modem name is for devices that do have a friendly name,
like Bluetooth headsets. Why do you wanna misuse the interface name
here. I am a bit against this, because it leads to speculation and
assumptions in userspace programs.

Regards

Marcel


_______________________________________________
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono

Reply via email to