Add RPC API

This commit is contained in:
Sergey Lyubka committed 2022-07-27 00:46:05 +01:00
1 parent 9cacf443e1
commit 0dabc45780
13 files changed
+332 -75

No files matched your search

+2 -2
View File
@@ -64,7 +64,7 @@ static void mg_putchar_iobuf_static(char ch, void *param) {
}
}
void mg_putchar_iobuf(char ch, void *param) {
void mg_pfn_iobuf(char ch, void *param) {
struct mg_iobuf *io = (struct mg_iobuf *) param;
if (io->len + 2 > io->size) mg_iobuf_resize(io, io->size + 64);
if (io->len + 2 <= io->size) {
@@ -75,7 +75,7 @@ void mg_putchar_iobuf(char ch, void *param) {
// We don't use realloc() in mongoose, so resort to inefficient calloc
// Every new character reallocates the whole string
void mg_putchar_realloc(char ch, void *param) {
void mg_pfn_realloc(char ch, void *param) {
char *s, *buf = *(char **) param;
size_t len = buf == NULL ? 0 : strlen(buf);
if ((s = (char *) calloc(1, len + 2)) != NULL) {