Skip to content

Cellular: Fix deleting of state machine to correct class #10338

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

Merged
merged 1 commit into from
Apr 9, 2019

Conversation

jarvte
Copy link
Contributor

@jarvte jarvte commented Apr 8, 2019

Description

State machine was deleted in different class than it was created. Now it's deleted in correct place.

Pull request type

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

Reviewers

@AriParkkila

Release Notes

@ciarmcom ciarmcom requested review from AriParkkila and a team April 8, 2019 07:00
@ciarmcom
Copy link
Member

ciarmcom commented Apr 8, 2019

@jarvte, thank you for your changes.
@AriParkkila @ARMmbed/mbed-os-wan @ARMmbed/mbed-os-maintainers please review.

@@ -116,9 +117,13 @@ nsapi_error_t CellularDevice::attach_to_network()

nsapi_error_t CellularDevice::create_state_machine()
{
_nw = open_network(_fh);

Choose a reason for hiding this comment

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

This could be inside if (!_state_machine) and it should also be closed when _stat_machine is deleted.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed. _state_machine is deleted in destructor and inheriting class will close all the opened interfaces in it's destructor.

@jarvte jarvte force-pushed the fix_deleting_of_stm branch from c193498 to fe5f978 Compare April 8, 2019 09:50
@jarvte
Copy link
Contributor Author

jarvte commented Apr 8, 2019

force-pushed review changes: moved opening of network interface under the if state machine.

@cmonr
Copy link
Contributor

cmonr commented Apr 8, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Apr 9, 2019

Test run: SUCCESS

Summary: 13 of 13 test jobs passed
Build number : 1
Build artifacts

@0xc0170 0xc0170 merged commit a59ba20 into ARMmbed:master Apr 9, 2019
@jarvte jarvte deleted the fix_deleting_of_stm branch April 9, 2019 10:34
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.

6 participants