We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1dd9dca commit 8cdcc2bCopy full SHA for 8cdcc2b
Firmware/RTK_Everywhere/Form.ino
@@ -94,9 +94,13 @@ static esp_err_t ws_handler(httpd_req_t *req)
94
systemPrintf("frame len is %d\r\n", ws_pkt.len);
95
if (ws_pkt.len) {
96
/* ws_pkt.len + 1 is for NULL termination as we are expecting a string */
97
- buf = (uint8_t *)calloc(1, ws_pkt.len + 1);
+ if (online.psram == true)
98
+ buf = (uint8_t *)ps_malloc(ws_pkt.len + 1);
99
+ else
100
+ buf = (uint8_t *)malloc(ws_pkt.len + 1);
101
+
102
if (buf == NULL) {
- systemPrintln("Failed to calloc memory for buf");
103
+ systemPrintln("Failed to malloc memory for buf");
104
return ESP_ERR_NO_MEM;
105
}
106
ws_pkt.payload = buf;
0 commit comments