Closed Bug 1113017 Opened 10 years ago Closed 10 years ago

[B2G][CBS] Additional message channel is set unexpectedly from ril_worker to ril daemon in GSM configuration.

Categories

(Firefox OS Graveyard :: RIL, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:2.0M+, firefox35 wontfix, firefox36 wontfix, firefox37 fixed, b2g-v2.0 wontfix, b2g-v2.0M fixed, b2g-v2.1 fixed, b2g-v2.1S fixed, b2g-v2.2 fixed)

RESOLVED FIXED
2.2 S3 (9jan)
blocking-b2g 2.0M+
Tracking Status
firefox35 --- wontfix
firefox36 --- wontfix
firefox37 --- fixed
b2g-v2.0 --- wontfix
b2g-v2.0M --- fixed
b2g-v2.1 --- fixed
b2g-v2.1S --- fixed
b2g-v2.2 --- fixed

People

(Reporter: bevis, Assigned: bevis)

References

Details

Attachments

(1 file)

1. In ril_worker.js, an array of half-closed ranges: [[from, to), [from, to),
   ...] is used to collect all the message ids from CBMI/CBMIR/CBMID/MMI.
2. In ril.h, the data structure RIL_GSM_BroadcastSmsConfigInfo is adopted by 
   REQUEST_GSM_SET_BROADCAST_SMS_CONFIG:
   typedef struct {
       int fromServiceId;
       int toServiceId;
       int fromCodeScheme;
       int toCodeScheme;
       unsigned char selected;
   } RIL_GSM_BroadcastSmsConfigInfo;
   Where uFromServiceID - uToServiceID defines a range of CBM message identifiers.
   It seems not necessary to exclude the toServiceId from the range. 
3. However, things go wrong in setGsmSmsBroadcastConfig() in ril_worker.js:
  setGsmSmsBroadcastConfig: function(config) {
    let Buf = this.context.Buf;
    Buf.newParcel(REQUEST_GSM_SET_BROADCAST_SMS_CONFIG);

    let numConfigs = config ? config.length / 2 : 0;
    Buf.writeInt32(numConfigs);
    for (let i = 0; i < config.length;) {
      Buf.writeInt32(config[i++]);
      Buf.writeInt32(config[i++]); <- This is wrong! It shall be config[i++]-1.
      Buf.writeInt32(0x00);
      Buf.writeInt32(0xFF);
      Buf.writeInt32(1);
    }
    Buf.sendParcel();
 }

This bug is filed to fix the problem mentioned above to ensure the search list to be set properly.
Hi Hsinyi,

May I have your review for this quick fix?
(Modification for the corresponding test case is also included)

Thanks!
Attachment #8538383 - Flags: review?(htsai)
Comment on attachment 8538383 [details] [diff] [review]
Patch v1: Update SearchList with correct ranges in GSM configuration. r=htsai.

Review of attachment 8538383 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/system/gonk/ril_worker.js
@@ +2154,2 @@
>        Buf.writeInt32(config[i++]);
> +      Buf.writeInt32(config[i++] - 1);

Nice catch, thank you.
Attachment #8538383 - Flags: review?(htsai) → review+
https://hg.mozilla.org/mozilla-central/rev/062566b84d83
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.2 S3 (9jan)
blocking-b2g: --- → 2.0M?
Blocks: Woodduck
blocking-b2g: 2.0M? → 2.0M+
Hi Bevis,
2.0M+ Thanks!
Flags: needinfo?(btseng)
(In reply to Josh Cheng [:josh] from comment #6)
> Hi Bevis,
> 2.0M+ Thanks!

The same patch can be applied to v2.0M without conflict.
Flags: needinfo?(btseng)
NI Kai-Zhen for 2.0m uplift.
Flags: needinfo?(kli)
Is this needed on v2.1 and/or v2.1s?
Flags: needinfo?(btseng)
Comment on attachment 8538383 [details] [diff] [review]
Patch v1: Update SearchList with correct ranges in GSM configuration. r=htsai.

NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings.

[Approval Request Comment]
Bug caused by (feature/regressing bug #): N/A
User impact if declined:
1. Additional CBS Channel will be listened unexpectedly.
2. Cause configuration failed when enabling the CBS Channel 65534 as mentioned in duplicated bug 1121801.
Testing completed: Yes. Test Case included.
Risk to taking this patch (and alternatives if risky): No.
String or UUID changes made by this patch:N/A
Attachment #8538383 - Flags: approval-mozilla-b2g34?
(In reply to Ryan VanderMeulen [:RyanVM UTC-5] from comment #11)
> Is this needed on v2.1 and/or v2.1s?

Thanks for reminding this! :)
I've requested the approval for uplifting to v2.1.
Flags: needinfo?(btseng)
Attachment #8538383 - Flags: approval-mozilla-b2g34? → approval-mozilla-b2g34+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: