sockets[old_alloc].type = type;
sockets_alloc = new_alloc;
new_socket(sock_type type, int fd){	u_int i, old_alloc;	if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0)		error("fcntl O_NONBLOCK: %s", strerror(errno));	if (fd > max_fd)		max_fd = fd;	for (i = 0; i < sockets_alloc; i++)		if (sockets[i].type == AUTH_UNUSED) {			sockets[i].fd = fd;			sockets[i].type = type;			buffer_init(&sockets[i].input);			buffer_init(&sockets[i].output);			buffer_init(&sockets[i].request);			return;		}	old_alloc = sockets_alloc;	sockets_alloc += 10;	if (sockets)		sockets = xrealloc(sockets, sockets_alloc * sizeof(sockets[0]));	else		sockets = xmalloc(sockets_alloc * sizeof(sockets[0]));	for (i = old_alloc; i < sockets_alloc; i++)		sockets[i].type = AUTH_UNUSED;	sockets[old_alloc].type = type;	sockets[old_alloc].fd = fd;	buffer_init(&sockets[old_alloc].input);	buffer_init(&sockets[old_alloc].output);	buffer_init(&sockets[old_alloc].request);}