Welcome! Log In Create A New Profile

Advanced

Question on Evan Miller's tutorial - Body filter?

March 10, 2011 10:06AM
Hello,
I'm going through Evan Miller's tutorial on Nginx module. In part "4.2. Anatomy of a Body Filter", there's a piece of code like this:
"And hook the buffer into a new chain link:

ngx_chain_t added_link;

added_link.buf = b;
added_link.next = NULL;
Finally, hook the new chain link to the final chain link we found before:

chain_link->next = added_link;
And reset the "last_buf" variables to reflect reality:

chain_link->buf->last_buf = 0;
added_link->buf->last_buf = 1;"

At the last line, added_link is being used as a structure pointer but at the beginning it's defined as a structure. Am i missing something? Compiler gives error for this incompetible usage.

Thanks
Subject Author Posted

Question on Evan Miller's tutorial - Body filter?

ctasdemir March 10, 2011 10:06AM

Re: Question on Evan Miller's tutorial - Body filter?

ctasdemir March 14, 2011 03:47AM

Re: Question on Evan Miller's tutorial - Body filter?

agentzh March 14, 2011 04:00AM

Re: Question on Evan Miller's tutorial - Body filter?

ctasdemir March 14, 2011 05:42AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 221
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