[PATCH 1/2] libmbim-glib,proxy: Don't forward non-standard indications unless explicity registered

Aleksander Morgado aleksander at aleksander.es
Thu Jul 3 07:09:50 PDT 2014


On Wed, Jul 2, 2014 at 7:52 PM, Greg Suarez <gpsuarez2512 at gmail.com> wrote:
> Ensure that non-standard indications are not forwared unless the CID
> has been explicitly registered via MBIM_CID_DEVICE_SERVICE_SUBSCRIBE_LIST.
>
> Section 10.5.30.1 of the MBIM Specifiction states:
> "Upon OPEN_DONE completion, notifications for CIDs defined in this
> specification are enabled (aka subscribed to) by default, and vendor
> extension notifications are off by default."
> ---

Pushed the commit to the "greg/proxy" branch upstream.

Testers of the whole branch welcome :)

>  src/libmbim-glib/mbim-proxy.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/libmbim-glib/mbim-proxy.c b/src/libmbim-glib/mbim-proxy.c
> index de812bb..d89aac6 100644
> --- a/src/libmbim-glib/mbim-proxy.c
> +++ b/src/libmbim-glib/mbim-proxy.c
> @@ -329,7 +329,9 @@ indication_cb (MbimDevice *device,
>                      forward_indication = TRUE;
>              }
>          }
> -    } else
> +    } else if (mbim_message_indicate_status_get_service (message) != MBIM_SERVICE_INVALID &&
> +               !mbim_service_id_is_custom (mbim_message_indicate_status_get_service (message)))
> +        /* only forward standard service indications if service subscriber list is not enabled */
>          forward_indication = TRUE;
>
>      if (forward_indication) {
> --
> 1.9.3
>



-- 
Aleksander
https://aleksander.es


More information about the libmbim-devel mailing list