Welcome! Log In Create A New Profile

Advanced

Module: exit master

Laurent
February 03, 2012 08:26AM
Hi,

I'm experiencing some troubles (and headaches) with my little nginx module.
I've seen a lot of module code lately, and a ton of stuff about nginx
modules but I can't manage to do what I need to.
Here is my problem:
I have created my own nginx module called "mymodule". Its loc_conf
structure looks like that:

typedef struct {
void *serverConf;
ngx_str_t server_file;
} ngx_http_mymodule_loc_conf_t;

its command structure looks like that:

static ngx_command_t ngx_http_mymodule_commands[] = {
{
ngx_string("mymodule"),
NGX_HTTP_LOC_CONF | NGX_CONF_TAKE1,
ngx_http_mymodule,
NGX_HTTP_LOC_CONF_OFFSET,
0,
NULL
},
ngx_null_command };

in the ngx_http_mymodule function I do some stuff and set the
serverConf pointer in the ngx_http_mymodule_loc_conf_t.
The problem is that I would like to retrieve that serverConf pointer
when the thread / process is exited. But the only parameter given to
ngx_module_t while exiting thread process or master is a ngx_cycle_t*
and I can't find how to retrieve the ngx_http_mymodule_loc_conf_t from
it in order to work on that serverConf pointer.

Any help or idea would be appreciated :)
Thanks in advance.

--
larles

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Module: exit master

Laurent 1053 February 03, 2012 08:26AM

Re: Module: exit master

Maxim Dounin 631 February 03, 2012 09:36AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 297
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready