Skip to content

Commit

Permalink
DELIA-65984 - onError event is posted for WiFi scan even when scan is…
Browse files Browse the repository at this point in the history
… successful

Reason for change: WIFI_STATE_CONNECTION_FAILED was returned in the error code
mapping, when none of the error code matches because of which this event is being
posted to EPG and they are getting WIFI_STATE_CONNECTION_FAILED event. Removed this
event from existing code and added new evnt for default case
Test Procedure: Check whether any irrelevant state is posted during scanning in
wpeframework log
Risks: Low
Priority: P1
Signed-off-by: Gururaaja ESR <[email protected]>
  • Loading branch information
Gururaaja E S R authored and Gururaaja E S R committed Aug 28, 2024
1 parent 944f678 commit 8ede7f6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion NetworkManager/INetworkManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ namespace WPEFramework
WIFI_STATE_CONNECTION_INTERRUPTED,
WIFI_STATE_INVALID_CREDENTIALS,
WIFI_STATE_AUTHENTICATION_FAILED,
WIFI_STATE_ERROR
WIFI_STATE_ERROR,
WIFI_STATE_INVALID
};

using IInterfaceDetailsIterator = RPC::IIteratorType<InterfaceDetails, ID_NETWORKMANAGER_INTERFACE_DETAILS_ITERATOR>;
Expand Down
6 changes: 4 additions & 2 deletions NetworkManager/NetworkManagerRDKProxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ namespace WPEFramework
case WIFI_DISABLED:
return Exchange::INetworkManager::WIFI_STATE_DISABLED;
}
return Exchange::INetworkManager::WIFI_STATE_CONNECTION_FAILED;
return Exchange::INetworkManager::WIFI_STATE_INVALID;
}

Exchange::INetworkManager::WiFiState errorcode_to_wifi_state(WiFiErrorCode_t code) {
Expand All @@ -390,6 +390,8 @@ namespace WPEFramework
return Exchange::INetworkManager::WIFI_STATE_SSID_CHANGED;
case WIFI_CONNECTION_LOST:
return Exchange::INetworkManager::WIFI_STATE_CONNECTION_LOST;
case WIFI_CONNECTION_FAILED:
return Exchange::INetworkManager::WIFI_STATE_CONNECTION_FAILED;
case WIFI_CONNECTION_INTERRUPTED:
return Exchange::INetworkManager::WIFI_STATE_CONNECTION_INTERRUPTED;
case WIFI_INVALID_CREDENTIALS:
Expand All @@ -401,7 +403,7 @@ namespace WPEFramework
case WIFI_UNKNOWN:
return Exchange::INetworkManager::WIFI_STATE_ERROR;
}
return Exchange::INetworkManager::WIFI_STATE_CONNECTION_FAILED;
return Exchange::INetworkManager::WIFI_STATE_INVALID;
}

void NetworkManagerInternalEventHandler(const char *owner, IARM_EventId_t eventId, void *data, size_t len)
Expand Down

0 comments on commit 8ede7f6

Please sign in to comment.