Skip to content

Conversation

jarvte
Copy link
Contributor

@jarvte jarvte commented Nov 16, 2018

Description

  • disconnect now will also detach from the network on disconnect().
  • disconnect will deactivate PDP Context in PPP mode also
  • NSAPI_STATUS_DISCONNECTED is always called to callback function in disconnect

@mirelachirica @AriParkkila please review

Pull request type

[X] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

@0xc0170 0xc0170 requested a review from a team November 16, 2018 13:28
@jarvte jarvte force-pushed the gracefully_disconnect branch from 320f41c to 168b9ca Compare November 19, 2018 10:07
@jarvte
Copy link
Contributor Author

jarvte commented Nov 19, 2018

rebased as there was checkout failure in travis

@jarvte jarvte force-pushed the gracefully_disconnect branch from 168b9ca to e0290cd Compare November 19, 2018 10:50

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess disconnected event should be handled by +CGEV, when really disconnected.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reasons for sending NSAPI_STATUS_DISCONNECTED here:

  • +CGEV is unreliable
  • synchronous disconnect call in PPP mode will also send NSAPI_STATUS_DISCONNECTED before returning so it's on line with PPP now.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess CellularNetwork::detach should be updated to detach from network.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added register to CellularNetwork::detach

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

false is default

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true, removed extra false

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why to protect setting fileHandle, maybe this flag could be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, removed.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Return value is actually meaningless due to clear_error calls?

Copy link
Contributor Author

@jarvte jarvte Nov 19, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

almost, CGACT can still fail. CGACT is more powerful than commands above. So we try to do thing properly but the last CGACT will finally detach from the network and then it should not matter that the above commands have failed.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could take time as parameter.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added parameter

@jarvte jarvte force-pushed the gracefully_disconnect branch from e0290cd to a655a53 Compare November 19, 2018 14:02
@0xc0170
Copy link
Contributor

0xc0170 commented Nov 24, 2018

Info: This PR has been re-bundled into a new rollup PR (#8862).

No further work is needed here, as once that PR is merged, this PR will also be closed and marked as merged.
If any more commits are made in this PR, this PR will remain open and have to go through CI on its own.

@0xc0170 0xc0170 merged commit a655a53 into ARMmbed:master Nov 25, 2018
@0xc0170 0xc0170 removed the needs: CI label Nov 25, 2018
@cmonr cmonr removed the rollup PR label Nov 26, 2018
@jarvte jarvte deleted the gracefully_disconnect branch December 3, 2018 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants