Closed
Bug 930952
Opened 11 years ago
Closed 11 years ago
[DBus] DBus message are not dispatched immediately
Categories
(Firefox OS Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: tzimmermann, Assigned: tzimmermann)
References
Details
Attachments
(1 file)
1.58 KB,
patch
|
qdot
:
review+
qdot
:
feedback+
|
Details | Diff | Splinter Review |
Received DBus messages might get delayed indefinitely before being dispatched.
Assignee | ||
Comment 1•11 years ago
|
||
Hi Kyle, I noticed the following problem while refactoring the DBus code. Could you take a look at this? After reading DBus messages with dbus_watch_handle, there is a break statement, and the DBus messages are only dispatched after we read from the control socket, which might not happen until much later. The patch fixed this problem. There is a comment next to the break, so the current code might be correct, but to me it looks like the break should be removed at all, or maybe moved into the control-socket branch. Thanks!
Attachment #822249 -
Flags: feedback?(kyle)
Comment 2•11 years ago
|
||
Comment on attachment 822249 [details] [diff] [review] [01] Bug 930952: Dispatch DBus messages after reading socket Review of attachment 822249 [details] [diff] [review]: ----------------------------------------------------------------- So I agree with the idea that we should dispatch before breaking, but the solution is this patch has us ONLY dispatching when there's an event watch called. Unless I'm missing something about how watches work, I think instead we want to set a status flag in the else block, fall out of the else block, leave the dispatch in the same place it was before, then check status we set in else block and break if true there. That means we'll always dispatch after receiving any poll event, not just watches.
Attachment #822249 -
Flags: feedback?(kyle) → feedback-
Assignee | ||
Comment 3•11 years ago
|
||
As far as I understand the API, to process messages we first have to read from the watch by calling dbus_watch_handle, and afterwards dispatch messages one by one. We never call dbus_watch_handle in the if branch, so there is no point in running the dispatch loop. Am I missing something here?
Comment 4•11 years ago
|
||
Ah, yeah, you're right. Been long enough since I'd been in the dbus stuff myself that I forgot about the specifics of it. Flipping my fb :)
Updated•11 years ago
|
Attachment #822249 -
Flags: feedback- → feedback+
Assignee | ||
Comment 5•11 years ago
|
||
Comment on attachment 822249 [details] [diff] [review] [01] Bug 930952: Dispatch DBus messages after reading socket Ok, thanks. Can you review it?
Attachment #822249 -
Flags: review?(kyle)
Updated•11 years ago
|
Attachment #822249 -
Flags: review?(kyle) → review+
Assignee | ||
Comment 6•11 years ago
|
||
Thank you. https://hg.mozilla.org/integration/b2g-inbound/rev/568f78e76079 https://tbpl.mozilla.org/?tree=B2g-Inbound&rev=568f78e76079
Comment 7•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/568f78e76079
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•