if (debug) log_d("fill_connection: read(%d, %p, %d) = %d", cn->rfd, p->end, n, m);
static int fill_connection(struct connection *cn){	struct pool *p;	int poolleft, n, m;	long fileleft;	if (cn->rfd == -1)		return 0;	p = cn->output;	poolleft = p->ceiling - p->end;	fileleft = cn->left;	n = fileleft > poolleft ? poolleft : (int) fileleft;	if (n <= 0)		return 0;	cn->left -= n;	m = read(cn->rfd, p->end, n);	if (debug)		log_d("fill_connection: read(%d, %p, %d) = %d", cn->rfd, p->end, n, m);	if (m != n) {		if (m == -1)			lerror("read");		else			log_d("premature end of file %s", cn->r->path_translated);		return -1;	}	p->end += n;	return n;}