ngx_conf_set_str_array_slot() bug?
Paulo Silva
pauloasilva at gmail.com
Mon Aug 18 17:04:26 UTC 2014
Hi,
For a module with the following configuration
/**
* do_nothing_tuple "val1" "val2";
*/
static ngx_command_t ngx_http_do_nothing_commands[] = {
{
ngx_string("do_nothing_tuple"),
NGX_HTTP_LOC_CONF | NGX_CONF_TAKE2,
ngx_conf_set_str_array_slot,
NGX_HTTP_LOC_CONF_OFFSET,
offsetof(ngx_http_do_nothing_loc_conf_t, tuple),
NULL
},
ngx_null_command
};
I was expecting that ngx_conf_set_str_array_slot() would create and
initialize an ngx_array_t with two elements (nelts == 2), the given
parameters, but it saves just the first element (see
http://fossies.org/dox/nginx-1.7.4/ngx__conf__file_8c_source.html#l01034).
Is it a bug or ngx_conf_set_str_array_slot() use case is different?
Regards,
Paulo A. Silva
http://tech.pauloasilva.com
http://linkedin.com/in/devpauloasilva/
More information about the nginx-devel
mailing list