All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] atmodem/sms: no mms support for Gemalto
@ 2018-09-26 11:32 Giacinto Cifelli
  2018-09-26 21:34 ` Denis Kenzior
  0 siblings, 1 reply; 8+ messages in thread
From: Giacinto Cifelli @ 2018-09-26 11:32 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 854 bytes --]

---
 drivers/atmodem/sms.c | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/drivers/atmodem/sms.c b/drivers/atmodem/sms.c
index 64d0f6e8..db04cb1e 100644
--- a/drivers/atmodem/sms.c
+++ b/drivers/atmodem/sms.c
@@ -219,16 +219,21 @@ static void at_cmgs(struct ofono_sms *sms, const unsigned char *pdu,
 	char buf[512];
 	int len;
 
-	switch(data->vendor) {
-	case OFONO_VENDOR_GEMALTO:
-		break;
-	default:
-		if (mms) {
+	if (mms) {
+
+		switch (data->vendor) {
+
+		case OFONO_VENDOR_GEMALTO:
+			/* no mms support */
+			break;
+
+		default:
 			snprintf(buf, sizeof(buf), "AT+CMMS=%d", mms);
 			g_at_chat_send(data->chat, buf, none_prefix,
 					NULL, NULL, NULL);
+			break;
+
 		}
-		break;
 	}
 
 	len = snprintf(buf, sizeof(buf), "AT+CMGS=%d\r", tpdu_len);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] atmodem/sms: no mms support for Gemalto
  2018-09-26 11:32 [PATCH] atmodem/sms: no mms support for Gemalto Giacinto Cifelli
@ 2018-09-26 21:34 ` Denis Kenzior
  2018-09-27  2:10   ` Giacinto Cifelli
  0 siblings, 1 reply; 8+ messages in thread
From: Denis Kenzior @ 2018-09-26 21:34 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 310 bytes --]

Hi Giacinto,

On 09/26/2018 06:32 AM, Giacinto Cifelli wrote:
> ---
>   drivers/atmodem/sms.c | 17 +++++++++++------
>   1 file changed, 11 insertions(+), 6 deletions(-)
> 

This patch doesn't apply.  I'm guessing it is on top of your local tree 
and not on top of origin/master.

Regards,
-Denis

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] atmodem/sms: no mms support for Gemalto
  2018-09-26 21:34 ` Denis Kenzior
@ 2018-09-27  2:10   ` Giacinto Cifelli
  0 siblings, 0 replies; 8+ messages in thread
From: Giacinto Cifelli @ 2018-09-27  2:10 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 521 bytes --]

Hi Denis,

On Wed, Sep 26, 2018 at 11:34 PM Denis Kenzior <denkenz@gmail.com> wrote:

> Hi Giacinto,
>
> On 09/26/2018 06:32 AM, Giacinto Cifelli wrote:
> > ---
> >   drivers/atmodem/sms.c | 17 +++++++++++------
> >   1 file changed, 11 insertions(+), 6 deletions(-)
> >
>
> This patch doesn't apply.  I'm guessing it is on top of your local tree
> and not on top of origin/master.
>

yes, I have forgotten to commit out the previous version :(
I am going to resubmit soon.


> Regards,
> -Denis
>

[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 953 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] atmodem/sms: no mms support for Gemalto
  2018-09-27  2:43 Giacinto Cifelli
@ 2018-09-27 12:32 ` Denis Kenzior
  0 siblings, 0 replies; 8+ messages in thread
From: Denis Kenzior @ 2018-09-27 12:32 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 244 bytes --]

Hi Giacinto,

On 09/26/2018 09:43 PM, Giacinto Cifelli wrote:
> ---
>   drivers/atmodem/sms.c | 17 ++++++++++++++---
>   1 file changed, 14 insertions(+), 3 deletions(-)
> 

Applied after tweaking the coding style.

Regards,
-Denis

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] atmodem/sms: no mms support for Gemalto
@ 2018-09-27  2:43 Giacinto Cifelli
  2018-09-27 12:32 ` Denis Kenzior
  0 siblings, 1 reply; 8+ messages in thread
From: Giacinto Cifelli @ 2018-09-27  2:43 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 855 bytes --]

---
 drivers/atmodem/sms.c | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/drivers/atmodem/sms.c b/drivers/atmodem/sms.c
index 64169086..db04cb1e 100644
--- a/drivers/atmodem/sms.c
+++ b/drivers/atmodem/sms.c
@@ -220,9 +220,20 @@ static void at_cmgs(struct ofono_sms *sms, const unsigned char *pdu,
 	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) {
+
+		case OFONO_VENDOR_GEMALTO:
+			/* no mms support */
+			break;
+
+		default:
+			snprintf(buf, sizeof(buf), "AT+CMMS=%d", mms);
+			g_at_chat_send(data->chat, buf, none_prefix,
+					NULL, NULL, NULL);
+			break;
+
+		}
 	}
 
 	len = snprintf(buf, sizeof(buf), "AT+CMGS=%d\r", tpdu_len);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] atmodem/sms: no mms support for gemalto
  2018-09-25 14:49 ` Denis Kenzior
@ 2018-09-26  3:30   ` Giacinto Cifelli
  0 siblings, 0 replies; 8+ messages in thread
From: Giacinto Cifelli @ 2018-09-26  3:30 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1673 bytes --]

On Tue, 25 Sep 2018, 16:49 Denis Kenzior, <denkenz@gmail.com> 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

[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 3001 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] atmodem/sms: no mms support for gemalto
  2018-09-25 13:19 [PATCH] atmodem/sms: no mms support for gemalto Giacinto Cifelli
@ 2018-09-25 14:49 ` Denis Kenzior
  2018-09-26  3:30   ` Giacinto Cifelli
  0 siblings, 1 reply; 8+ messages in thread
From: Denis Kenzior @ 2018-09-25 14:49 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1133 bytes --]

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

> +	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:
	}
}

>   
>   	len = snprintf(buf, sizeof(buf), "AT+CMGS=%d\r", tpdu_len);
> 

Regards,
-Denis

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] atmodem/sms: no mms support for gemalto
@ 2018-09-25 13:19 Giacinto Cifelli
  2018-09-25 14:49 ` Denis Kenzior
  0 siblings, 1 reply; 8+ messages in thread
From: Giacinto Cifelli @ 2018-09-25 13:19 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 842 bytes --]

---
 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) {
+	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;
 	}
 
 	len = snprintf(buf, sizeof(buf), "AT+CMGS=%d\r", tpdu_len);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-09-27 12:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-26 11:32 [PATCH] atmodem/sms: no mms support for Gemalto Giacinto Cifelli
2018-09-26 21:34 ` Denis Kenzior
2018-09-27  2:10   ` Giacinto Cifelli
  -- strict thread matches above, loose matches on Subject: below --
2018-09-27  2:43 Giacinto Cifelli
2018-09-27 12:32 ` Denis Kenzior
2018-09-25 13:19 [PATCH] atmodem/sms: no mms support for gemalto Giacinto Cifelli
2018-09-25 14:49 ` Denis Kenzior
2018-09-26  3:30   ` Giacinto Cifelli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.