if (debug) log_d("POLLOUT %d", cn - connection_array);
static int setup_connection_pollfds(int n){	struct connection *cn;	cn = waiting_connections.head;	while (cn) {		if (debug)			log_d("POLLIN %d", cn - connection_array);		pollfds[n].fd = cn->fd;		pollfds[n].events = POLLIN;		cn->pollno = n++;		cn = cn->next;	}	cn = reading_connections.head;	while (cn) {		if (debug)			log_d("POLLIN %d", cn - connection_array);		pollfds[n].fd = cn->fd;		pollfds[n].events = POLLIN;		cn->pollno = n++;		cn = cn->next;	}	cn = writing_connections.head;	while (cn) {		if (debug)			log_d("POLLOUT %d", cn - connection_array);		pollfds[n].fd = cn->fd;		pollfds[n].events = POLLOUT;		cn->pollno = n++;		cn = cn->next;	}	return n;}