Hello,

On Thu, May 13, 2010 at 03:49:54PM +0800, xiaoxin wrote:
> Hello:
>        Sorry to send an uncompleted mail before.
>        Now I am adding an extra function to haproxy, but when I debug, I find 
> at expiration, haproxy  core dump on invoking hijacker. But I could not find 
> when the buffer->flags ORING BF_HIJACKER, I am really confused. 
>        and in 1.4.2 version hijacker are always null? how can I set this 
> function? could I remove all the code in session.c
>       process_session() 

The "hijack" functions were used to inject data into a buffer as
long as the BF_HIJACK flag was set on the buffer. Reading from a
socket to a buffer was also prevented as long as this flag was set.
This is how the stats work in haproxy 1.3 : the stats output is
forced into the buffer and nothing else can alter the buffer. In
1.4, it works differently because the stats run as a function
which simulates a connection to a server, which allows them to
run interactively. So in 1.4, the hijack functions are not used
anymore. I hesitated removing all the hijack mechanism in 1.4,
but I figured that if we need it later, it would be difficult to
reintroduce, so better keep it for now.

Look in 1.3 how this works for instance by analysing the function
stats_dump_raw_to_buffer().

Hoping this helps,
Willy


Reply via email to