Attempting to write a plugin

nginx.devlist.alias at fremnet.net nginx.devlist.alias at fremnet.net
Fri Mar 16 13:33:53 UTC 2012


Hi

I'm attempting to write my first plugin, it's going swimmingly except 
it's not.

I'm trying to add to the SSI module the same way the perl module does 
and have spent a lot of time flicking between the two (c isn't one of my 
strong languages).

It appears to work, the very last log line does get called, then it 
segfaults

2012/03/16 20:14:55 [emerg] 10663#0: *1 working with the bufferzzzzzz 
while sending response to client, client: 118.xx.xx.66, server: 
flatus.xx.net, request: "GET /index.html HTTP/1.1", host: 
"flatus.xx.net:8081"

2012/03/16 20:14:55 [emerg] 10663#0: *1 working with the buffer failing 
btw YqEgHCzpROFbVQPah9mA_w==,1331892955 while sending response to 
client, client: 118.xx.xx.66, server: flatus.xx.net, request: "GET 
/index.html HTTP/1.1", host: "flatus.xx.net:8081"

I've attached the plugin, such as it is...

You get the log message from line 130
ngx_log_error(NGX_LOG_EMERG, c->log, 0, "working with the buffer failing 
btw %V", &foo);

but then it promptly crashes....

Any ideas? I thought it was going along so well :(

Thanks

Shannon.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ngx_http_secure_link_ssi_module.c
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20120316/1b1734c2/attachment.c>


More information about the nginx-devel mailing list