Closed Bug 884131 Opened 11 years ago Closed 11 years ago

Messages to netd need sequence number on gonk-JB

Categories

(Firefox OS Graveyard :: General, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mwu, Assigned: vchang)

References

Details

Attachments

(1 file, 3 obsolete files)

Messages to netd now require a sequence number at the beginning.
Assignee: nobody → vchang
Vliu is interested in this bug. Assign the bug to him.
Assignee: vchang → vliu
For vold, the sequence number could be zero, in which case it isn't checked (and so it doesn't need to increment). When you use a sequence number, you'll also get a sequence number in the replies as well.
Attached patch Patch v1.0 for mc (obsolete) (deleted) — Splinter Review
Netd also inherits the FrameworkListener class. So the sequence number could be zero like the vold case, too.
Attachment #783055 - Flags: review?(dhylands)
Attached patch Patch v1.0 for mc (obsolete) (deleted) — Splinter Review
Sorry, I posted the wrong file. Please ignore previous one.
Assignee: vliu → vchang
Attachment #783055 - Attachment is obsolete: true
Attachment #783055 - Flags: review?(dhylands)
Attachment #783057 - Flags: review?(dhylands)
So I see you setting the sequence number to zero when you send the commands. However, I would have expected that onNetMessage should also have some code to remove the sequence number from the response, otherwise the variable reason (from onNetdResponse) will have a leading "0 " when sequence numbers are used.
Flags: needinfo?(vchang)
Thanks for your reminding. I'll post a new patch to address your comments soon. After upgrading the repo from jb 4.2 to JB 4.3, I can't startup b2g successfully. The screen stopped in Google .... I'll try to get a clean repo and try again.
Flags: needinfo?(vchang)
Attached patch Patch v1.1 for mc (obsolete) (deleted) — Splinter Review
I have verified this patch in nexus 4 and unagi.
Attachment #783057 - Attachment is obsolete: true
Attachment #783057 - Flags: review?(dhylands)
Attachment #784754 - Flags: review?(dhylands)
Comment on attachment 784754 [details] [diff] [review] Patch v1.1 for mc Review of attachment 784754 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/system/gonk/net_worker.js @@ +324,5 @@ > + } > + result += String.fromCharCode(octet); > + } > + return null; > +} nit: I think that its worth a comment to explain why you're writing your own splice routine and not using built in one.
Attachment #784754 - Flags: review?(dhylands) → review+
Attached patch Patch v1.2 ready to land for mc (deleted) — Splinter Review
Add the comment to split() function.
Attachment #784754 - Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 11 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: