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
_______________________________________________
ofono mailing list
[email protected]
https://lists.ofono.org/mailman/listinfo/ofono

Reply via email to