Skip to content

Commit

Permalink
error fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cmuhammedrafi committed Oct 13, 2024
1 parent 3c7a033 commit 701bf9e
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions GnomeProxy/NetworkManagerGnomeClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -722,11 +722,6 @@ namespace WPEFramework
{
GVariantBuilder connBuilder;
bool ret = false;

//TODO check if wificonnected to same ssid
//TODO check if same connection is there and
// verify ssid and password is same call read connection path and activate connection
// if not same remove the connection
deviceProperties properties;

if(!GnomeUtils::getDevicePropertiesByIfname(dbusConnection.getConnection(), GnomeUtils::getWifiIfname(), properties))
Expand All @@ -737,10 +732,19 @@ namespace WPEFramework

if(properties.path.empty() || properties.state == NM_DEVICE_STATE_UNKNOWN)
{
NMLOG_WARNING("access point not active");
NMLOG_WARNING("wlan0 interface not active");
return false;
}

/*
*
* 1. check interface state
* 2. check available connection check ssid and password security matches
* 3. if matches use the same connection to activate
* 4. else remove connection if same conn name
* 5. then activate new connection
*/

ret = gVariantConnectionBuilder(ssidinfo, connBuilder);
if(!ret) {
NMLOG_WARNING("connection builder failed");
Expand All @@ -750,7 +754,7 @@ namespace WPEFramework
if(addNewConnctionAndactivate(dbusConnection.getConnection(), connBuilder, properties.path.c_str(), ssidinfo.m_persistSSIDInfo))
NMLOG_INFO("wifi connect request success");
else
NMLOG_ERROR("wifi connect request Failed");
NMLOG_ERROR("wifi connect request failed");

return true;
}
Expand Down

0 comments on commit 701bf9e

Please sign in to comment.