B2G Emulator: Refactor the fall-through flow for RIL_REQUEST in reference-ril

RESOLVED FIXED

Status

Firefox OS
General
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: edgar, Assigned: edgar)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

4 years ago
The fall-through flow for RIL_REQUEST [1] in reference-ril has some potential problems.
* It is easy to break the flow by changing the sequence and finally run into an unexpected case block.
* Can not base on this flow to have the same check for GSM specific requests.

Maybe we should have a separated switch-case for CDMA/GSM specific request set. It seems more clear and more easily to maintain.

Thanks

[1] https://github.com/mozilla-b2g/platform_hardware_ril/blob/ec665107b24b2002e45d9de5236536130d7b1827/reference-ril/reference-ril.c#L2434
(Assignee)

Comment 1

4 years ago
Created attachment 780889 [details]
hardware/ril pull request #21
(Assignee)

Updated

4 years ago
Attachment #780889 - Flags: review?(vyang)
Created attachment 782408 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/platform_hardware_ril/pull/21#issuecomment-21698812

Pointer to Github pull-request
Comment on attachment 782408 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/platform_hardware_ril/pull/21#issuecomment-21698812

oops! Was just browsing accidentally hit the attach button...
Attachment #782408 - Attachment is obsolete: true
Comment on attachment 780889 [details]
hardware/ril pull request #21

nit: TECH_BIT(sMdmInfo) & (MDM_CDMA | MDM_EVDO).  Will merge after this nit addressed.
Attachment #780889 - Flags: review?(vyang) → review+
Merged on GitHub: https://github.com/mozilla-b2g/platform_hardware_ril/commit/3ee3eba20f763699b3d711839fed972c999daf85
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.