mirror of https://git.48k.eu/ogserver
#915 set maximum REST API response to 64 Kbytes
The existing 4 Kbytes might not be enough to store the results of the GET /clients request, extend it up to 64 Kbytes.master
parent
7e6ba45f95
commit
e80c85fbff
|
@ -3951,9 +3951,11 @@ static int og_client_not_authorized(struct og_client *cli)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define OG_MSG_RESPONSE_MAXLEN 65536
|
||||||
|
|
||||||
static int og_client_ok(struct og_client *cli, char *buf_reply)
|
static int og_client_ok(struct og_client *cli, char *buf_reply)
|
||||||
{
|
{
|
||||||
char buf[4096] = {};
|
char buf[OG_MSG_RESPONSE_MAXLEN] = {};
|
||||||
int err = 0, len;
|
int err = 0, len;
|
||||||
|
|
||||||
len = snprintf(buf, sizeof(buf),
|
len = snprintf(buf, sizeof(buf),
|
||||||
|
@ -3977,9 +3979,9 @@ enum og_rest_method {
|
||||||
|
|
||||||
static int og_client_state_process_payload_rest(struct og_client *cli)
|
static int og_client_state_process_payload_rest(struct og_client *cli)
|
||||||
{
|
{
|
||||||
|
char buf_reply[OG_MSG_RESPONSE_MAXLEN] = {};
|
||||||
struct og_msg_params params = {};
|
struct og_msg_params params = {};
|
||||||
enum og_rest_method method;
|
enum og_rest_method method;
|
||||||
char buf_reply[4096] = {};
|
|
||||||
const char *cmd, *body;
|
const char *cmd, *body;
|
||||||
json_error_t json_err;
|
json_error_t json_err;
|
||||||
json_t *root = NULL;
|
json_t *root = NULL;
|
||||||
|
|
Loading…
Reference in New Issue