summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_conf.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2017-06-29 19:26:32 +0300
committerIgor Sysoev <igor@sysoev.ru>2017-06-29 19:26:32 +0300
commitf05d674126f3ec3f147f645231a1357e4a0784bf (patch)
tree9c4d0366056632714bfa3793f5c53299c6c22ce1 /src/nxt_conf.c
parent46c6513c2b686d4a6e26c0fe0d0db4280baf5f3e (diff)
downloadunit-f05d674126f3ec3f147f645231a1357e4a0784bf.tar.gz
unit-f05d674126f3ec3f147f645231a1357e4a0784bf.tar.bz2
Added nxt_msec_t element to nxt_conf_map_object().
Diffstat (limited to 'src/nxt_conf.c')
-rw-r--r--src/nxt_conf.c24
1 files changed, 15 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();
}