diff options
author | Igor Sysoev <igor@sysoev.ru> | 2017-06-29 19:26:32 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2017-06-29 19:26:32 +0300 |
commit | f05d674126f3ec3f147f645231a1357e4a0784bf (patch) | |
tree | 9c4d0366056632714bfa3793f5c53299c6c22ce1 /src | |
parent | 46c6513c2b686d4a6e26c0fe0d0db4280baf5f3e (diff) | |
download | unit-f05d674126f3ec3f147f645231a1357e4a0784bf.tar.gz unit-f05d674126f3ec3f147f645231a1357e4a0784bf.tar.bz2 |
Added nxt_msec_t element to nxt_conf_map_object().
Diffstat (limited to '')
-rw-r--r-- | src/nxt_conf.c | 24 | ||||
-rw-r--r-- | src/nxt_conf.h | 1 |
2 files changed, 16 insertions, 9 deletions
diff --git a/src/nxt_conf.c b/src/nxt_conf.c index 6d9cbf74..0ae5d816 100644 --- a/src/nxt_conf.c +++ b/src/nxt_conf.c @@ -257,15 +257,16 @@ nxt_conf_map_object(nxt_conf_value_t *value, nxt_conf_map_t *map, void *data) nxt_conf_value_t *v; union { - uint8_t ui8; - int32_t i32; - int64_t i64; - nxt_int_t i; - ssize_t size; - off_t off; - double dbl; - nxt_str_t str; - void *v; + uint8_t ui8; + int32_t i32; + int64_t i64; + nxt_int_t i; + ssize_t size; + off_t off; + nxt_msec_t msec; + double dbl; + nxt_str_t str; + void *v; } *ptr; for (i = 0; map[i].name.length != 0; i++) { @@ -295,6 +296,7 @@ nxt_conf_map_object(nxt_conf_value_t *value, nxt_conf_map_t *map, void *data) case NXT_CONF_MAP_INT: case NXT_CONF_MAP_SIZE: case NXT_CONF_MAP_OFF: + case NXT_CONF_MAP_MSEC: if (v->type != NXT_CONF_INTEGER) { return NXT_ERROR; @@ -322,6 +324,10 @@ nxt_conf_map_object(nxt_conf_value_t *value, nxt_conf_map_t *map, void *data) ptr->off = v->u.integer; break; + case NXT_CONF_MAP_MSEC: + ptr->msec = v->u.integer; + break; + default: nxt_unreachable(); } diff --git a/src/nxt_conf.h b/src/nxt_conf.h index a481d4dc..45d5ece4 100644 --- a/src/nxt_conf.h +++ b/src/nxt_conf.h @@ -20,6 +20,7 @@ typedef enum { NXT_CONF_MAP_INT, NXT_CONF_MAP_SIZE, NXT_CONF_MAP_OFF, + NXT_CONF_MAP_MSEC, NXT_CONF_MAP_DOUBLE, NXT_CONF_MAP_STR, NXT_CONF_MAP_PTR, |