Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Electron] connect_cancel() fix #1464

Merged
merged 2 commits into from Jan 22, 2018

Conversation

@avtolstoy
Copy link
Member

commented Jan 17, 2018

submission notes
**Important:** Please sanitize/remove any confidential info like usernames, passwords, org names, product names/ids, access tokens, client ids/secrets, or anything else you don't wish to share.

Please Read and Sign the Contributor License Agreement ([Info here](https://github.com/spark/firmware/blob/develop/CONTRIBUTING.md)).

You may also delete this submission notes header if you'd like. Thank you for contributing!

Problem

Only the first CellularNetworkInterface::connect_cancel() call succeeds, subsequent calls do not cancel running connection attempt due to the fact that connect_cancelled flag is never cleared.

Solution

Clear it in CellularNetworkInterface::connect_finalize().

This PR also fixes a method name clash between MDMElectronSerial::resume() and MDMParser::resume().

Steps to Test

I've encountered this issue while testing sleep modes on Electron.

  1. Use SYSTEM_THREAD(ENABLED)
  2. Enter sleep (STOP mode)
  3. After waking up, do another sleep attempt while Electron is still trying to connect to the network
  4. Electron will not enter sleep mode until it manages to connect

Example App

N/A

References

N/A


Completeness

  • User is totes amazing for contributing!
  • Contributor has signed CLA (Info here)
  • Problem and Solution clearly stated
  • Run unit/integration/application tests on device
  • Added documentation
  • Added to CHANGELOG.md after merging (add links to docs and issues)
avtolstoy added 2 commits Jan 17, 2018
electron: connect_cancelled flag needs to be reset, otherwise the nex…
…t connect_cancel() call will not cancel the connection
MDMElectronSerial::resume() method should be renamed to resumeRecv() …
…as to avoid a name clash with MDMParser::resume()

@avtolstoy avtolstoy added the bug label Jan 17, 2018

@avtolstoy avtolstoy requested review from technobly and m-mcgowan Jan 17, 2018

@avtolstoy avtolstoy removed the request for review from technobly Jan 18, 2018

@avtolstoy

This comment has been minimized.

Copy link
Member Author

commented Jan 18, 2018

This PR should also be merged into 0.7.0, as the issue surfaced after making System.sleep() calls synchronous (#1259)

@m-mcgowan m-mcgowan added this to the 0.8.0-rc.2 milestone Jan 18, 2018

@m-mcgowan m-mcgowan merged commit 8bacb44 into develop Jan 22, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@m-mcgowan m-mcgowan deleted the fix/electron-connect-cancel branch Jan 22, 2018

@m-mcgowan m-mcgowan modified the milestones: 0.8.0-rc.2, 0.7.0-rc.7 Feb 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.