Skip to content

Prevent double attempt to connect mesh api #9550

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

Conversation

michalpasztamobica
Copy link
Contributor

Description

Socket network interface tests were failing due to DICONNECTED event
being advertised, where GLOBAL_UP was expected. It turned out that
nanostack receives two events: APPL_EVENT_CONNECT and
APPL_BACKHAUL_INTERFACE_PHY_UP. The second attempt to connect obviously
returns errors, but it also causes events to be sent out to the
application. The second attempt should not take place in case the
bootstrap is already started.

I also fixed two reports being sent with DISCONNECT status, while they
are actually something else.

Pull request type

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

Reviewers

@SeppoTakalo
@kjbracey-arm

@michalpasztamobica michalpasztamobica force-pushed the nanostack_double_connection_attempt branch from f7b8805 to 71c98ca Compare January 30, 2019 12:52
Socket network interface tests were failing due to DICONNECTED event
being advertised, where GLOBAL_UP was expected. It turned out that
nanostack receives two events: APPL_EVENT_CONNECT and
APPL_BACKHAUL_INTERFACE_PHY_UP. The second attempt to connect obviously
returns errors, but it also causes events to be sent out to the
application. The second attempt should not take place in case the
bootstrap is already started.

I also fixed two reports being sent with DISCONNECT status, while they
are actually something else.
@michalpasztamobica michalpasztamobica force-pushed the nanostack_double_connection_attempt branch from 71c98ca to 53a82fa Compare January 30, 2019 13:08
@ciarmcom ciarmcom requested review from kjbracey, SeppoTakalo and a team January 30, 2019 14:01
@ciarmcom
Copy link
Member

@michalpasztamobica, thank you for your changes.
@SeppoTakalo @kjbracey-arm @ARMmbed/mbed-os-ipcore @ARMmbed/mbed-os-maintainers please review.

@cmonr
Copy link
Contributor

cmonr commented Jan 30, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Jan 31, 2019

Test run: SUCCESS

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

@0xc0170 0xc0170 merged commit 1af3842 into ARMmbed:master Jan 31, 2019
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