Discussion:
[PATCH] atmodem/sms: no mms support for gemalto
Denis Kenzior
2018-09-25 14:49:25 UTC
Permalink
Hi Giacinto,
---
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
+ break;
+ 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

Loading...