in the azx_ftp.c, line 407: while ((rv = ctl->idlecb(ctl, ctl->xfered, ctl->idlearg) > 0 )); could it possibly mean while ((rv = ctl->idlecb(ctl, ctl->xfered, ctl->idlearg)) > 0 ); instead? otherwise line 408: if(rv == -1) will never be true?