forked from j3d1/fiatlux
implement syslog via websocket with 1k buffer
This commit is contained in:
parent
7a627ee1f1
commit
5466bceb0e
6 changed files with 139 additions and 18 deletions
|
|
@ -3,6 +3,7 @@
|
|||
//
|
||||
|
||||
#include "wifi.h"
|
||||
#include "log.h"
|
||||
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
|
@ -36,7 +37,7 @@ SemaphoreHandle_t wifi_available_semaphore = nullptr;
|
|||
char *wifi_ap_ip_addr = nullptr;
|
||||
sysparam_get_string("wifi_ap_ip_addr", &wifi_ap_ip_addr);
|
||||
if(!wifi_ap_ip_addr) {
|
||||
printf("dns: no ip address\n");
|
||||
syslog("dns: no ip address\n");
|
||||
vTaskDelete(nullptr);
|
||||
}
|
||||
ip4_addr_t server_addr;
|
||||
|
|
@ -194,7 +195,7 @@ extern "C" void wifi_task(void *pvParameters) {
|
|||
/* If the ssid and password are not valid then disable the AP interface. */
|
||||
if(!wifi_ap_ssid || strlen(wifi_ap_ssid) < 1 || strlen(wifi_ap_ssid) >= 32 ||
|
||||
!wifi_ap_password || strlen(wifi_ap_password) < 8 || strlen(wifi_ap_password) >= 64) {
|
||||
printf("len err\n");
|
||||
syslog("len err\n");
|
||||
wifi_ap_enable = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue