On 4/29/11 12:10 PM, Rafal Somla wrote:
> + /*
> + Code for testing the logic for sending the first client payload.
> + A fake data of length given by environment variable TEST_PACKET_LENGTH
> + (or default 255 bytes) is sent to the server. First 2 bytes of the
> + payload contain its total length (LSB first). The length of test data
> + is limited to 2048 bytes.
> + Upon receiving test data, server will check that data is correct and
> + refuse connection. If server detects data errors it will crash on
> + assertion.
> + This code is executed if debug flag "winauth_first_packet_test" is
> + set, e.g. using client option:
> + --debug="d,winauth_first_packet_test"
> + The same debug flag must be enabled in the server, e.g. using
> + statement:
> + SET GLOBAL debug= '+d,winauth_first_packet_test';
> + */
> + static byte test_buf;
This is made non-reentrant / thread-unsafe on purpose?