Your ROOT_URL in app.ini is https://source.parasitstudio.de:63000/ but you are visiting https://source.parasitstudio.de/wirtz/esp-link/commit/8867c8e9b666003439a0c89bdd810d3a0b235852
You should set ROOT_URL correctly, otherwise the web may not work correctly.
1 changed files with
7 additions and
3 deletions
esp-link/cgiwifi.c
@ -227,18 +227,22 @@ static int ICACHE_FLASH_ATTR cgiWiFiGetScan(HttpdConnData *connData) {
const int chunk = 1460 / 64 ; // ssid is up to 32 chars
int len = 0 ;
os_printf ( " GET scan: cgiData=%d noAps=%d \n " , ( int ) connData - > cgiData , cgiWifiAps . noAps ) ;
// handle continuation call, connData->cgiData-1 is the position in the scan results where we
// we need to continue sending from (using -1 'cause 0 means it's the first call)
if ( connData - > cgiData ) {
int next = ( int ) connData - > cgiData - 1 ;
int pos = next ;
while ( pos < cgiWifiAps . noAps & & pos < next + chunk ) {
len + = os_sprintf ( buff + len , " { \" essid \" : \" %s \" , \" rssi \" : %d, \" enc \" : \" %d \" }, \n " ,
cgiWifiAps . apData [ pos ] - > ssid , cgiWifiAps . apData [ pos ] - > rssi , cgiWifiAps . apData [ pos ] - > enc ) ;
len + = os_sprintf ( buff + len , " { \" essid \" : \" %s \" , \" rssi \" : %d, \" enc \" : \" %d \" }%c \n " ,
cgiWifiAps . apData [ pos ] - > ssid , cgiWifiAps . apData [ pos ] - > rssi , cgiWifiAps . apData [ pos ] - > enc ,
( pos + 1 = = cgiWifiAps . noAps ) ? ' ' : ' , ' ) ;
pos + + ;
}
// done or more?
if ( pos = = cgiWifiAps . noAps ) {
len + = os_sprintf ( buff + len - 1 , " ]}} \n " ) ;
len + = os_sprintf ( buff + len , " ]}} \n " ) ;
httpdSend ( connData , buff , len ) ;
return HTTPD_CGI_DONE ;
} else {