diff options
author | Valentin Bartenev <vbart@nginx.com> | 2017-08-16 15:45:12 +0300 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2017-08-16 15:45:12 +0300 |
commit | 95907e29128c51be79aec0b5149e2639c3fd9042 (patch) | |
tree | 56e266c7a914e2cd8e32a8c3de9f3d41447340f6 /src/nxt_router.c | |
parent | 2dd8048bf9d80d045f3df8f0930c3325bf8a14f9 (diff) | |
download | unit-95907e29128c51be79aec0b5149e2639c3fd9042.tar.gz unit-95907e29128c51be79aec0b5149e2639c3fd9042.tar.bz2 |
Object mapping interface extended with more string types.
Diffstat (limited to 'src/nxt_router.c')
-rw-r--r-- | src/nxt_router.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nxt_router.c b/src/nxt_router.c index e55f0fb0..5a053278 100644 --- a/src/nxt_router.c +++ b/src/nxt_router.c @@ -667,7 +667,9 @@ nxt_router_conf_create(nxt_task_t *task, nxt_router_temp_conf_t *tmcf, return NXT_ERROR; } - ret = nxt_conf_map_object(conf, nxt_router_conf, + mp = tmcf->conf->mem_pool; + + ret = nxt_conf_map_object(mp, conf, nxt_router_conf, nxt_nitems(nxt_router_conf), tmcf->conf); if (ret != NXT_OK) { nxt_log(task, NXT_LOG_CRIT, "root map error"); @@ -723,7 +725,7 @@ nxt_router_conf_create(nxt_task_t *task, nxt_router_temp_conf_t *tmcf, continue; } - ret = nxt_conf_map_object(application, nxt_router_app_conf, + ret = nxt_conf_map_object(mp, application, nxt_router_app_conf, nxt_nitems(nxt_router_app_conf), &apcf); if (ret != NXT_OK) { nxt_log(task, NXT_LOG_CRIT, "application map error"); @@ -782,8 +784,6 @@ nxt_router_conf_create(nxt_task_t *task, nxt_router_temp_conf_t *tmcf, next = 0; - mp = tmcf->conf->mem_pool; - for ( ;; ) { listener = nxt_conf_next_object_member(listeners, &name, &next); if (listener == NULL) { @@ -806,7 +806,7 @@ nxt_router_conf_create(nxt_task_t *task, nxt_router_temp_conf_t *tmcf, goto fail; } - ret = nxt_conf_map_object(listener, nxt_router_listener_conf, + ret = nxt_conf_map_object(mp, listener, nxt_router_listener_conf, nxt_nitems(nxt_router_listener_conf), &lscf); if (ret != NXT_OK) { nxt_log(task, NXT_LOG_CRIT, "listener map error"); @@ -825,7 +825,7 @@ nxt_router_conf_create(nxt_task_t *task, nxt_router_temp_conf_t *tmcf, skcf->body_read_timeout = 5000; if (http != NULL) { - ret = nxt_conf_map_object(http, nxt_router_http_conf, + ret = nxt_conf_map_object(mp, http, nxt_router_http_conf, nxt_nitems(nxt_router_http_conf), skcf); if (ret != NXT_OK) { nxt_log(task, NXT_LOG_CRIT, "http map error"); |