[PATCH] libmbim: Add mbim-proxy support

Aleksander Morgado aleksander at aleksander.es
Sat May 24 04:52:50 PDT 2014

Hey Greg,

Just reviewing your mbim-proxy work. I made some more commits on top
of yours, changing some defaults and fixing some missing docs; it's
all in the 'greg/proxy' branch in upstream git.

Got a question, though:

On Thu, Apr 17, 2014 at 12:48 AM, Greg Suarez <gpsuarez2512 at gmail.com> wrote:
> +    gboolean forward_indication = FALSE;
> +
> +    if (mbim_message_indicate_status_get_service (message) == MBIM_SERVICE_INVALID) {
> +        for (i = 0; i < client->mbim_client_info_array->len; i++) {
> +            MbimClientInfo *info;
> +
> +            info = &g_array_index (client->mbim_client_info_array, MbimClientInfo, i);
> +            /* If service UUID match, forward to the remote client */
> +            if (mbim_uuid_cmp(mbim_message_indicate_status_get_service_id (message), &info->uuid)) {
> +                forward_indication = TRUE;
> +                break;
> +            }
> +        }
> +    } else
> +        forward_indication = TRUE;

I see that indications for known services are forwarded to all clients
by default, while indications for unknown services are only forwarded
if they are 'tracked' (i.e. if the client actually used that service
before explicitly). Not sure if that is the right approach as the
device may send indications of an unknown service even before the user
has used it... I believe that for now we should stick to sending all
indications to every client, as that is what a client not using the
proxy would expect, and the proxy aims to be transparent. Sure,
clients will get indications for services they may not be able to use,
but that is anyway the case when the proxy is not used.

What do you think?


More information about the libmbim-devel mailing list