summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/nxt_conf.c24
-rw-r--r--src/nxt_conf.h1
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,