summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorTiago Natel <t.nateldemoura@f5.com>2019-10-11 10:00:06 +0000
committerTiago Natel <t.nateldemoura@f5.com>2019-10-11 10:00:06 +0000
commit0beb8ea5e13befbe607a107c3e8093226848811a (patch)
tree57d3134a7c3027bc5304365e295192911e220a5f /src
parent09e7357b085aab4f29bdadceee112bd7a8ccf706 (diff)
downloadunit-0beb8ea5e13befbe607a107c3e8093226848811a.tar.gz
unit-0beb8ea5e13befbe607a107c3e8093226848811a.tar.bz2
Fixed passing false in namespace flags.
This patch closes #328 in github.
Diffstat (limited to '')
-rw-r--r--src/nxt_conf.c7
-rw-r--r--src/nxt_conf.h1
-rw-r--r--src/nxt_main_process.c6
3 files changed, 10 insertions, 4 deletions
diff --git a/src/nxt_conf.c b/src/nxt_conf.c
index 59eddd77..43820d2a 100644
--- a/src/nxt_conf.c
+++ b/src/nxt_conf.c
@@ -228,6 +228,13 @@ nxt_conf_get_integer(nxt_conf_value_t *value)
}
+uint8_t
+nxt_conf_get_boolean(nxt_conf_value_t *value)
+{
+ return value->u.boolean;
+}
+
+
nxt_uint_t
nxt_conf_object_members_count(nxt_conf_value_t *value)
{
diff --git a/src/nxt_conf.h b/src/nxt_conf.h
index 725a6c95..66201fee 100644
--- a/src/nxt_conf.h
+++ b/src/nxt_conf.h
@@ -115,6 +115,7 @@ NXT_EXPORT void nxt_conf_set_string(nxt_conf_value_t *value, nxt_str_t *str);
NXT_EXPORT nxt_int_t nxt_conf_set_string_dup(nxt_conf_value_t *value,
nxt_mp_t *mp, nxt_str_t *str);
NXT_EXPORT int64_t nxt_conf_get_integer(nxt_conf_value_t *value);
+NXT_EXPORT uint8_t nxt_conf_get_boolean(nxt_conf_value_t *value);
// FIXME reimplement and reorder functions below
nxt_uint_t nxt_conf_object_members_count(nxt_conf_value_t *value);
diff --git a/src/nxt_main_process.c b/src/nxt_main_process.c
index 84f6e2a2..4e55dcfa 100644
--- a/src/nxt_main_process.c
+++ b/src/nxt_main_process.c
@@ -1600,11 +1600,9 @@ nxt_init_set_ns(nxt_task_t *task, nxt_process_init_t *init,
return NXT_ERROR;
}
- if (nxt_conf_get_integer(value) == 0) {
- continue; /* process shares everything by default */
+ if (nxt_conf_get_boolean(value)) {
+ init->isolation.clone.flags |= flag;
}
-
- init->isolation.clone.flags |= flag;
}
return NXT_OK;