[GECKO & RIL]RILNetworkInterface doesn't reset the cid ,when data connection is disconnected.

RESOLVED DUPLICATE of bug 939046

Status

Firefox OS
RIL
RESOLVED DUPLICATE of bug 939046
5 years ago
4 years ago

People

(Reporter: Ming, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
RILNetworkInterface will reset the cids only when the state changed to RIL.GECKO_NETWORK_STATE_UNKNOWN.

code is in RILNetworkInterface.dataCallStateChanged:

    if (this.state == RIL.GECKO_NETWORK_STATE_UNKNOWN &&
        this.registeredAsNetworkInterface) {
      gNetworkManager.unregisterNetworkInterface(this);
      this.registeredAsNetworkInterface = false;
      this.cid = null;
      this.connectedTypes = [];
      return;
    }

But,if the data connection is disconnected by network ,then the state of data connection maybe won't be set to GECKO_NETWORK_STATE_UNKNOWN.

code is in RIL._processDataCallList :


      if (updatedDataCall && !updatedDataCall.ifname) {
        delete this.currentDataCalls[currentDataCall.cid];
        currentDataCall.state = GECKO_NETWORK_STATE_UNKNOWN;
        currentDataCall.rilMessageType = "datacallstatechange";
        this.sendChromeMessage(currentDataCall);
        continue;
      }

So ,if RILC doesn't send the calllist , or updatedDataCall.ifname is not null, then the state won't be set to GECKO_NETWORK_STATE_UNKNOWN.


As a result of if the cid is not reset to null, when the dataconnection is disconnected . It will have no changce to handle the datacallstatechanged event, if new connection is setup with a different cid. The code is :
 
  dataCallStateChanged: function dataCallStateChanged(datacall) {
    if (this.cid && this.cid != datacall.cid) {
    // If data call for this connection existed but cid mismatched,
    // it means this datacall state change is not for us.
      return;
    }
(Reporter)

Updated

5 years ago
Summary: [GECKO & RIL]RILNetworkInterface does reset the cid ,when data connection is disconnected. → [GECKO & RIL]RILNetworkInterface doesn't reset the cid ,when data connection is disconnected.
I think this has been solved after bug 939046, please reopen if it's not so.

Thanks.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 939046
You need to log in before you can comment on or make changes to this bug.