#include	"trust.h"
#include	"shm.h"
#include	"repeater.h"

void	noRoute (void)
{
	int	n;
	struct	timeval	c_time;
	struct	timeval	t1, t2;

	gettimeofday (&c_time, NULL);
	t1.tv_sec = 1;
	t1.tv_usec = 0;

	for (n = 0 ; n < MAX_SHM ; n++)
	{
		if (shm_msg->shmem[n].mem.type == ReqConnect)
		{
			timeradd (&shm_msg->shmem[n].e_time, &t1, &t2);
			if (timercmp (&c_time, &t2, >))
			{
				shm_msg->shmem[n].mem.type = NoRoute;
			}
		}
	}
}
