[PATCH] sms-part-cdma: add missing break statements in cause_code_to_delivery_state

Aleksander Morgado aleksander at aleksander.es
Thu Aug 3 10:31:36 UTC 2017


On 03/08/17 06:53, Ben Chan wrote:
> This patch fixes cause_code_to_delivery_state() by adding two missing
> break statements for the case ERROR_CLASS_TEMPORARY and
> ERROR_CLASS_PERMANENT in the `switch (error_class)` statement. Without
> the break statements, the switch always falls through to the default and
> returns MM_SMS_DELIVERY_STATE_UNKNOWN for an `error_class' of value
> ERROR_CLASS_TEMPORARY or ERROR_CLASS_PERMANENT.
> ---

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

>  src/mm-sms-part-cdma.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/mm-sms-part-cdma.c b/src/mm-sms-part-cdma.c
> index 3aa6b455..8d76bcec 100644
> --- a/src/mm-sms-part-cdma.c
> +++ b/src/mm-sms-part-cdma.c
> @@ -273,8 +273,10 @@ cause_code_to_delivery_state (guint8 error_class,
>          return MM_SMS_DELIVERY_STATE_COMPLETED_RECEIVED;
>      case ERROR_CLASS_TEMPORARY:
>          delivery_state += 0x300;
> +        break;
>      case ERROR_CLASS_PERMANENT:
>          delivery_state += 0x200;
> +        break;
>      default:
>          return MM_SMS_DELIVERY_STATE_UNKNOWN;
>      }
> 


-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list