init_module вызывается до обработки конфигурации.<br><br><div class="gmail_quote">2010/6/30 Anton Dutov <span dir="ltr">&lt;<a href="mailto:anton.dutov@gmail.com">anton.dutov@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Как можно получить конфигурацию виртуального хоста в обработчике module_init ?<br>
(ngx_int_t           (*init_module)(ngx_cycle_t *cycle); )<br>
<br>
в структуре ngx_cycle_s имеется указатель на конфигурационный контекст модуля<br>
<br>
struct ngx_cycle_s {<br>
    void                  ****conf_ctx;<br>
<br>
так же имеется макрос<br>
#define ngx_http_conf_get_module_srv_conf(cf, module)<br>
       \<br>
    ((ngx_http_conf_ctx_t *) cf-&gt;ctx)-&gt;srv_conf[module.ctx_index]<br>
<br>
можно было бы как нить так преобразовать<br>
 ((ngx_http_conf_ctx_t ****)cycle-&gt;conf_ctx)-&gt;srv_conf[module.ctx_index]<br>
<br>
если бы не четверной указатель<br>
_______________________________________________<br>
nginx-ru mailing list<br>
<a href="mailto:nginx-ru@nginx.org">nginx-ru@nginx.org</a><br>
<a href="http://nginx.org/mailman/listinfo/nginx-ru" target="_blank">http://nginx.org/mailman/listinfo/nginx-ru</a><br>
</blockquote></div><br>