static char * ngx_rtmp_live_set_msec_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) { char *p = conf; ngx_str_t *value; ngx_msec_t *msp; msp = (ngx_msec_t *) (p + cmd->offset); value = cf->args->elts; if (value[1].len == sizeof("off") - 1 && ngx_strncasecmp(value[1].data, (u_char *) "off", value[1].len) == 0) { *msp = 0; return NGX_CONF_OK; } return ngx_conf_set_msec_slot(cf, cmd, conf); }
static char * ngx_mail_throttle_user_ttl (ngx_conf_t *cf, ngx_command_t *cmd, void *conf) { char *res; ngx_str_t *value; ngx_mail_throttle_srv_conf_t *tscf = conf; res = ngx_conf_set_msec_slot(cf, cmd, conf); if (res != NGX_CONF_OK) { return res; } value = cf->args->elts; res = ngx_mail_throttle_set_ttl_text (tscf->mail_login_user_ttl, &value[1], &tscf->mail_login_user_ttl_text); if (res != NGX_CONF_OK) { return res; } return NGX_CONF_OK; }