[PATCH] bearer-qmi: fix incorrect use of mm_base_bearer_get_status

Aleksander Morgado aleksander at aleksander.es
Tue Jan 24 10:09:25 UTC 2017


On 24/01/17 08:07, Ben Chan wrote:
> This patch fixes a bug in packet_service_status_indication_cb(), which
> incorrectly treats the MMBearerStatus enum value returned by
> mm_base_bearer_get_status() as a MMBearerConnectionStatus enum value.
> MMBearerStatus and MMBearerConnectionStatus can't be used
> interchangeably as they have different enum values for the
> 'disconnected' and 'disconnecting' state.
> ---

Pushed to git master and mm-1-6, thanks!

>  src/mm-bearer-qmi.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/mm-bearer-qmi.c b/src/mm-bearer-qmi.c
> index a886ef96..72f2de4b 100644
> --- a/src/mm-bearer-qmi.c
> +++ b/src/mm-bearer-qmi.c
> @@ -771,11 +771,11 @@ packet_service_status_indication_cb (QmiClientWds *client,
>              &connection_status,
>              NULL,
>              NULL)) {
> -        MMBearerConnectionStatus bearer_status = mm_base_bearer_get_status (MM_BASE_BEARER (self));
> +        MMBearerStatus bearer_status = mm_base_bearer_get_status (MM_BASE_BEARER (self));
>  
>          if (connection_status == QMI_WDS_CONNECTION_STATUS_DISCONNECTED &&
> -            bearer_status != MM_BEARER_CONNECTION_STATUS_DISCONNECTED &&
> -            bearer_status != MM_BEARER_CONNECTION_STATUS_DISCONNECTING) {
> +            bearer_status != MM_BEARER_STATUS_DISCONNECTED &&
> +            bearer_status != MM_BEARER_STATUS_DISCONNECTING) {
>              QmiWdsCallEndReason cer;
>              QmiWdsVerboseCallEndReasonType verbose_cer_type;
>              gint16 verbose_cer_reason;
> 


-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list