isimodem: Fix SMSC address update request
authorAki Niemi <aki.niemi@nokia.com>
Thu, 14 Oct 2010 07:40:37 +0000 (10:40 +0300)
committerAki Niemi <aki.niemi@nokia.com>
Thu, 14 Oct 2010 12:22:16 +0000 (15:22 +0300)
drivers/isimodem/sms.c

index 1d69dbb..73a56b9 100644 (file)
@@ -167,7 +167,7 @@ static void isi_sca_set(struct ofono_sms *sms,
                0xFD,   /* Params present, only SCA */
        };
 
-       uint8_t filler[40];
+       uint8_t filler[40] = { 0 };
        uint8_t bcd[12];
 
        struct iovec iov[4] = {
@@ -182,7 +182,7 @@ static void isi_sca_set(struct ofono_sms *sms,
 
        encode_bcd_number(sca->number, bcd + 2);
        bcd[0] = 1 + (strlen(sca->number) + 1) / 2;
-       bcd[1] = sca->type;
+       bcd[1] = sca->type & 0x0f;
 
        if (g_isi_request_vmake(sd->sim, iov, 4, SIM_TIMEOUT,
                                sca_set_resp_cb, cbd))