azure: Rework connection status reporting
Network status was not managed properly in azure client glue code:
- wait_for_event was unblocking for any event triggered not the
specific event required as input of the function. This causes issues
when the network stack trigger spurious event NETWORK_UP events.
- The state of the network was read from the events set. Unfortunatelly,
this can cause issues when the events are NETWORK_UP and NETWORK_DOWN
are triggered and the event not read in between.
To solve these issues, the following solutions have been implemented:
- the state of the network is stored in a local variable and updated
whenever NETWORK_UP or NETWORK_DOWN are received. This filters out
spurious events from the network stack. An event
AZURE_NETWORK_CHANGE_FLAG is triggered to inform the azure code
that the network state has changed.
- The function wait_for_event only waits for a specific event instead of
all events.
Signed-off-by:
Vincent Coubard <vincent.coubard@arm.com>
Please register or sign in to comment