Closed Bug 708926 Opened 13 years ago Closed 13 years ago

RIL does not reconnect on socket connection loss

Categories

(Core :: IPC, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla11

People

(Reporter: qdot, Assigned: qdot)

References

Details

Attachments

(1 file, 2 obsolete files)

If the RIL for some reason cannot pick up a connection to the rilb2g socket, it does not current retry for connection. This needs to be fixed in the RIL thread.
Put a space between comments and the comment slashes //[ ]comment, and also put the "return" on a new line. I am not fluent in IPC, so lets wait for r=chris, but looks good to me. Nice fix.
Attachment #581010 - Attachment is obsolete: true
Attachment #581010 - Flags: review?(jones.chris.g)
Attachment #581050 - Flags: review?(jones.chris.g)
Blocks: b2g-ril
No longer blocks: b2g-telephony
Comment on attachment 581050 [details] [diff] [review]
RIL Patch with comment/return fixes

>diff --git a/ipc/ril/Ril.cpp b/ipc/ril/Ril.cpp

>+void RilReconnectTask::Run() {

Nit:

void
RilReconnectTask::Run()
{

>+    if(sClient->OpenSocket()) {

Nit: "if ("

>@@ -221,6 +234,13 @@ RilClient::OnFileCanReadWithoutBlocking(int fd)
>             int ret = read(fd, mIncoming->mData, 1024);
>             if (ret <= 0) {
>                 LOG("Cannot read from network, error %d\n", ret);
>+                //At this point, assume that we can't actually access
>+                //the socket anymore, and start a reconnect loop.

Nit: Space after "//".

>+                mIncoming.forget();
>+                mReadWatcher.StopWatchingFileDescriptor();
>+                mWriteWatcher.StopWatchingFileDescriptor();
>+                close(mSocket.mFd);

I would prefer if this were packaged into a "*State" kind of struct,
so that it could all be reset as a group, but this is OK for now.

Looks good, r=me with nits picked.
Attachment #581050 - Flags: review?(jones.chris.g) → review+
https://hg.mozilla.org/mozilla-central/rev/e6f4331dba0d
Assignee: nobody → kyle
Status: NEW → RESOLVED
Closed: 13 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
Component: DOM → IPC
QA Contact: general → ipc
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: