summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_main_process.c
diff options
context:
space:
mode:
authorAndrew Clayton <a.clayton@nginx.com>2024-06-26 23:52:43 +0100
committerAndrew Clayton <a.clayton@nginx.com>2024-07-12 16:44:54 +0100
commitc8d70c3ff28bcf18dfbcfa1332ce0f0d869c0d5f (patch)
tree3f71104c012dedd4896a101779e3a8c93c9656d8 /src/nxt_main_process.c
parent081e51151efc7976f578692ee9fc23df14b35a6e (diff)
downloadunit-c8d70c3ff28bcf18dfbcfa1332ce0f0d869c0d5f.tar.gz
unit-c8d70c3ff28bcf18dfbcfa1332ce0f0d869c0d5f.tar.bz2
status: Use a variable to represent the status member index
In nxt_status_get() call nxt_conf_set_member() multiple times to set the main /status json sections. Previously this used hard coded values, 0, 1, 2 etc, if you wanted to change the order or insert new sections it could mean renumbering all these. Instead use a variable to track this index which starts at 0 and is simply incremented in each call of nxt_conf_set_member(). Currently this is only for the main outer sections, but can be replicated for inner sections if required. This is a preparatory patch for adding a new "modules" section at the top. Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
Diffstat (limited to 'src/nxt_main_process.c')
0 files changed, 0 insertions, 0 deletions