The test for data partially transferred is incorrectec: chan->xfrd != xfrlen Should be chan->xfrd > 0 From Ronly XLN.