1
0
mirror of https://github.com/billz/raspap-webgui.git synced 2023-10-10 13:37:24 +02:00

disable check on existing session variable

This commit is contained in:
zbchristian 2020-06-14 17:40:50 +02:00 committed by GitHub
parent b9ba2946a5
commit 417e9489bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -142,12 +142,12 @@ function sortNetworksByRSSI(&$networks)
*/ */
function getWifiInterface() function getWifiInterface()
{ {
if (empty($_SESSION['ap_interface'])) { // if (empty($_SESSION['ap_interface'])) {
$arrHostapdConf = parse_ini_file(RASPI_CONFIG.'/hostapd.ini'); $arrHostapdConf = parse_ini_file(RASPI_CONFIG.'/hostapd.ini');
$iface = $_SESSION['ap_interface'] = isset($arrHostapdConf['WifiInterface']) ? $arrHostapdConf['WifiInterface'] : RASPI_WIFI_AP_INTERFACE; $iface = $_SESSION['ap_interface'] = isset($arrHostapdConf['WifiInterface']) ? $arrHostapdConf['WifiInterface'] : RASPI_WIFI_AP_INTERFACE;
// check for 2nd wifi interface -> wifi client on different interface // check for 2nd wifi interface -> wifi client on different interface
exec("iw dev | awk '$1==\"Interface\" && $2!=\"$iface\" {print $2}'",$iface2); exec("iw dev | awk '$1==\"Interface\" && $2!=\"$iface\" {print $2}'",$iface2);
$_SESSION['wifi_client_interface'] = empty($iface2) ? $iface : trim($iface2[0]); $_SESSION['wifi_client_interface'] = empty($iface2) ? $iface : trim($iface2[0]);
} // }
} }