solve flowcontrol problems 29/2929/1
authorAndy Green <andy.green@linaro.org>
Thu, 17 Jan 2013 08:50:35 +0000 (16:50 +0800)
committerKevron Rees <kevron_m_rees@linux.intel.com>
Thu, 7 Mar 2013 21:01:26 +0000 (13:01 -0800)
commit54d213a026d1b72e6c923502cf5a37eb66577b39
tree52f59e2db0696f31760f5970eefe1909b3783bf6
parent8c02f147719f6e8ba390a9362fc71a61f5046d04
solve flowcontrol problems

Problems with rx flow control implementation were the underlying cause
of the connection stalling issue that was covered up with the udelay()
patch that was removed recently.

This get rx flow control working properly and corrects problems with
fifo management in the test server mirror protocol code too.

The rxfow control api has been changed to just set a flag, so it's very cheap
to call from user code.  After the callbacks that might use the rxflow control
api the flag is checked and any pending actions done.

rx flow control now stops any rx packet coming immediately, with compessed
connections "just what was left in the pipe" might be hundreds of KBytes.  To
implement that the current packet being decoded is copied into a malloc'd buffer
by the rx processing code now.

When rxflow is allows to come again, the buffer is drained and freed before any
new packet content is accepted.

Signed-off-by: Andy Green <andy.green@linaro.org>
lib/Makefile.am
lib/extension-deflate-frame.c
lib/libwebsockets.c
lib/parsers.c
lib/private-libwebsockets.h
test-server/test-server.c