Welcome! Log In Create A New Profile


is it useless for function ngx_event_pipe_free_shadow_raw_buf

January 02, 2011 09:03AM
The function is in file ngx_event_pipe.c,it is not too long,but i am confused by it.
when i debug it,it always says buf->shadow is NULL,and then return.so i think it is useless.At the same time,i am confused how can cl->buf equal s.Thanks for your explanations.The follow is the code.

static ngx_inline void
ngx_event_pipe_free_shadow_raw_buf(ngx_chain_t **free, ngx_buf_t *buf)
ngx_buf_t *s;
ngx_chain_t *cl, **ll;

if (buf->shadow == NULL) {

for (s = buf->shadow; !s->last_shadow; s = s->shadow) { /* void */ }

ll = free;

for (cl = *free; cl; cl = cl->next) {
if (cl->buf == s) {
*ll = cl->next;

if (cl->buf->shadow) {

ll = &cl->next;
Subject Author Posted

is it useless for function ngx_event_pipe_free_shadow_raw_buf

lihongfu January 02, 2011 09:03AM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 87
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready