Ejemplo n.º 1
0
void ftp_got_info(struct connection *c, struct read_buffer *rb)
{
	int g = get_ftp_response(c, rb, 0);
	if (g == -1) { setcstate(c, S_FTP_ERROR); abort_connection(c); return; }
	if (!g) { read_from_socket(c, c->sock1, rb, ftp_got_info); return; }
	if (g >= 400) { setcstate(c, S_FTP_UNAVAIL); retry_connection(c); return; }
	ftp_got_user_info(c, rb);
}
Ejemplo n.º 2
0
static void ftp_logged(struct connection *c)
{
    struct read_buffer *rb;
    if (!(rb = alloc_read_buffer(c))) return;
    if (!ftp_options.fast_ftp) {
        ftp_got_user_info(c, rb);
        return;
    }
    read_from_socket(c, c->sock1, rb, ftp_got_info);
}