summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_controller.c
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2017-06-23 23:28:37 +0300
committerValentin Bartenev <vbart@nginx.com>2017-06-23 23:28:37 +0300
commit9399a04121c054433ba3247523487d94ba9db2ba (patch)
treef441a1eac67258b444881018d072520bcb1df333 /src/nxt_controller.c
parent72429410f78721a7c7076d4684e4c23e47d80bcf (diff)
downloadunit-9399a04121c054433ba3247523487d94ba9db2ba.tar.gz
unit-9399a04121c054433ba3247523487d94ba9db2ba.tar.bz2
Configuration printing functions splitted in two parts.
Requested by Igor.
Diffstat (limited to '')
-rw-r--r--src/nxt_controller.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nxt_controller.c b/src/nxt_controller.c
index f20fd685..33bb3e93 100644
--- a/src/nxt_controller.c
+++ b/src/nxt_controller.c
@@ -786,7 +786,7 @@ nxt_controller_response_body(nxt_controller_response_t *resp, nxt_mp_t *pool)
nxt_memzero(&pretty, sizeof(nxt_conf_json_pretty_t));
- size = nxt_conf_json_print_value(NULL, value, &pretty) + 2;
+ size = nxt_conf_json_value_length(value, &pretty) + 2;
b = nxt_buf_mem_alloc(pool, size, 0);
if (nxt_slow_path(b == NULL)) {
@@ -795,8 +795,7 @@ nxt_controller_response_body(nxt_controller_response_t *resp, nxt_mp_t *pool)
nxt_memzero(&pretty, sizeof(nxt_conf_json_pretty_t));
- b->mem.free = (u_char *) nxt_conf_json_print_value(b->mem.free, value,
- &pretty);
+ b->mem.free = nxt_conf_json_value_print(b->mem.free, value, &pretty);
*b->mem.free++ = '\r';
*b->mem.free++ = '\n';