Skip to content

Commit

Permalink
make a warning of deprecated cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
yzprofile committed Jan 16, 2016
1 parent bcdb3da commit f4021fb
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions ngx_http_dyups_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ static ngx_int_t ngx_http_dyups_pre_conf(ngx_conf_t *cf);
static ngx_int_t ngx_http_dyups_init(ngx_conf_t *cf);
static void *ngx_http_dyups_create_main_conf(ngx_conf_t *cf);
static char *ngx_http_dyups_init_main_conf(ngx_conf_t *cf, void *conf);
static char *ngx_http_dyups_cmd_deprecated(ngx_conf_t *cf, ngx_command_t *cmd,
void *conf);
static char *ngx_http_dyups_interface(ngx_conf_t *cf, ngx_command_t *cmd,
void *conf);
static ngx_int_t ngx_http_dyups_interface_handler(ngx_http_request_t *r);
Expand Down Expand Up @@ -187,6 +189,13 @@ static ngx_command_t ngx_http_dyups_commands[] = {
offsetof(ngx_http_dyups_main_conf_t, shm_size),
NULL },

{ ngx_string("dyups_upstream_conf"),
NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1,
ngx_http_dyups_cmd_deprecated,
NGX_HTTP_MAIN_CONF_OFFSET,
0,
NULL },

{ ngx_string("dyups_trylock"),
NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1,
ngx_conf_set_flag_slot,
Expand Down Expand Up @@ -2300,3 +2309,14 @@ ngx_dyups_del_upstream_filter(ngx_http_upstream_main_conf_t *umcf,
{
return NGX_OK;
}


static char *
ngx_http_dyups_cmd_deprecated(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
{
ngx_conf_log_error(NGX_LOG_WARN, cf, 0,
"invalid directive \"%V\" of ngx_http_dyups_module, "
"it has been deprecated", &cmd->name);

return NGX_CONF_OK;
}

0 comments on commit f4021fb

Please sign in to comment.