On Tue, 25 Sep 2018, 16:49 Denis Kenzior, <[email protected]> wrote:
> Hi Giacinto,
>
> On 09/25/2018 08:19 AM, Giacinto Cifelli wrote:
> > ---
> > drivers/atmodem/sms.c | 14 ++++++++++----
> > 1 file changed, 10 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/atmodem/sms.c b/drivers/atmodem/sms.c
> > index 64169086..64d0f6e8 100644
> > --- a/drivers/atmodem/sms.c
> > +++ b/drivers/atmodem/sms.c
> > @@ -219,10 +219,16 @@ static void at_cmgs(struct ofono_sms *sms, const
> unsigned char *pdu,
> > char buf[512];
> > int len;
> >
> > - if (mms) {
> > - snprintf(buf, sizeof(buf), "AT+CMMS=%d", mms);
> > - g_at_chat_send(data->chat, buf, none_prefix,
> > - NULL, NULL, NULL);
> > + switch(data->vendor) {
>
> Space after switch
>
ok. I thought it was after the entire structure, ie, after the closing }.
> > + case OFONO_VENDOR_GEMALTO:
> > + break;
> > + default:
> > + if (mms) {
> > + snprintf(buf, sizeof(buf), "AT+CMMS=%d", mms);
> > + g_at_chat_send(data->chat, buf, none_prefix,
> > + NULL, NULL, NULL);
> > + }
> > + break;
> > }
>
> Hmm, wouldn't this be more logical & readable this way:
>
> if (mms) {
> switch (data->vendor) {
> case:
> default:
> }
> }
>
that is a good idea. I will change and submit shortly
> >
> > len = snprintf(buf, sizeof(buf), "AT+CMGS=%d\r", tpdu_len);
> >
>
> Regards,
> -Denis
>
regards,
Giacinto
_______________________________________________
ofono mailing list
[email protected]
https://lists.ofono.org/mailman/listinfo/ofono