Closed Bug 1007538 Opened 10 years ago Closed 10 years ago

[B2G][RIL] fix error handling of REQUEST_QUERY_FACILITY_LOCK

Categories

(Firefox OS Graveyard :: RIL, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: hsinyi, Assigned: hsinyi)

Details

(Whiteboard: [p=1])

Attachments

(1 file)

Seems we need to add |this.sendChromeMessage(options); return;| right after [1].

[1] http://hg.mozilla.org/mozilla-central/annotate/39578a226d51/dom/system/gonk/ril_worker.js#l5898
Attached patch 1007538.patchSplinter Review
Hi Edgar,

Could you help review this? Thank you~
Attachment #8419301 - Flags: review?(echen)
Comment on attachment 8419301 [details] [diff] [review]
1007538.patch

Nice catch!!
Shall we do the same thing for REQUEST_SET_FACILITY_LOCK?
Attachment #8419301 - Flags: review?(echen) → review+
(In reply to Edgar Chen [:edgar][:echen] from comment #2)
> Comment on attachment 8419301 [details] [diff] [review]
> 1007538.patch
> 
> Nice catch!!
> Shall we do the same thing for REQUEST_SET_FACILITY_LOCK?

Thanks for the review :)

For SET_FACILITY_LOCK, I think the current code looks fine. I mean, we need to query "retryCount" if SET_FACILITY_LOCK fails. We don't really need "retryCount" if the operation succeeds. However, as ril.h defines  |response" is int *
          * ((int *)response)[0] is the number of retries remaining, or -1 if unknown|,
it's also fine to keep that. How do you think?
(In reply to Hsin-Yi Tsai  [:hsinyi] from comment #3)
> (In reply to Edgar Chen [:edgar][:echen] from comment #2)
> > Comment on attachment 8419301 [details] [diff] [review]
> > 1007538.patch
> > 
> > Nice catch!!
> > Shall we do the same thing for REQUEST_SET_FACILITY_LOCK?
> 
> Thanks for the review :)
> 
> For SET_FACILITY_LOCK, I think the current code looks fine. I mean, we need
> to query "retryCount" if SET_FACILITY_LOCK fails. We don't really need
> "retryCount" if the operation succeeds. However, as ril.h defines 
> |response" is int *
>           * ((int *)response)[0] is the number of retries remaining, or -1
> if unknown|,
> it's also fine to keep that. How do you think?

Yes, agree with you. Thank you :)
Assignee: nobody → htsai
Whiteboard: [p=1]
https://hg.mozilla.org/mozilla-central/rev/97cfbfb61ebd
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: