mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-02-11 22:45:37 +00:00
Power monitor - added configurable history model
Fixed bug: missing call of BL_stared_init Fixed bug: htprintf128 change to vsnprintf with buffer limit set to 256 bytes
This commit is contained in:
@ -425,7 +425,7 @@ int hprintf128(http_request_t* request, const char* fmt, ...) {
|
||||
//BaseType_t taken;
|
||||
char tmp[256];
|
||||
va_start(argList, fmt);
|
||||
vsprintf(tmp, fmt, argList);
|
||||
vsnprintf(tmp, 255, fmt, argList);
|
||||
va_end(argList);
|
||||
return postany(request, tmp, strlen(tmp));
|
||||
}
|
||||
@ -616,4 +616,4 @@ const char pageScript[] = "<script type='text/javascript'>var firstTime,lastTime
|
||||
|
||||
//region_start ha_discovery_script
|
||||
const char ha_discovery_script[] = "<script type='text/javascript'>function send_ha_disc(){var e=new XMLHttpRequest;e.open(\"GET\",\"/ha_discovery?prefix=\"+document.getElementById(\"ha_disc_topic\").value,!1),e.onload=function(){200===e.status?alert(e.responseText):404===e.status&&alert(\"Error invoking ha_discovery\")},e.onerror=function(){alert(\"Error invoking ha_discovery\")},e.send()}</script>";
|
||||
//region_end ha_discovery_script
|
||||
//region_end ha_discovery_script
|
||||
|
||||
Reference in New Issue
Block a user