sbin/XNSrouted/timer.c
/*
 * On hangup, let everyone know we're going away.
 */
On hangup, let everyone know we're going away.
On hangup let everyone know we ' re going away .
void
hup()
{
	register struct rthash *rh;
	register struct rt_entry *rt;
	struct rthash *base = hosthash;
	int doinghost = 1;
	if (supplier) {
again:
		for (rh = base; rh < &base[ROUTEHASHSIZ]; rh++) {
			rt = rh->rt_forw;
			for (; rt != (struct rt_entry *)rh; rt = rt->rt_forw)
				rt->rt_metric = HOPCNT_INFINITY;
		}
		if (doinghost) {
			doinghost = 0;
			base = nethash;
			goto again;
		}
		toall(supply);
	}
	exit(1);
}
void hup ( ) { register struct rthash * rh ; register struct rt_entry * rt ; struct rthash * base = hosthash ; int doinghost = 1 ; if ( supplier ) { again : for ( rh = base ; rh < & base [ ROUTEHASHSIZ ] ; rh ++ ) { rt = rh -> rt_forw ; for ( ; rt != ( struct rt_entry * ) rh ; rt = rt -> rt_forw ) rt -> rt_metric = HOPCNT_INFINITY ; } if ( doinghost ) { doinghost = 0 ; base = nethash ; goto again ; } toall ( supply ) ; } exit ( 1 ) ; }
On hangup, let everyone know we're going away.
On hangup let everyone know we ' re going away .