// Copyright (c) 2002 FireBrick (Andrews & Arnold Ltd / Watchfront Ltd) - GPL licenced
// vim: sw=8 ts=8
-char const *cvs_id_l2tpns = "$Id: l2tpns.c,v 1.65 2004-12-13 02:27:31 bodea Exp $";
+char const *cvs_id_l2tpns = "$Id: l2tpns.c,v 1.68 2004-12-13 05:27:19 bodea Exp $";
#include <arpa/inet.h>
#include <assert.h>
{
// Dump accounting data
next_acct = TIME + ACCT_TIME;
+ next_shut_acct = TIME + ACCT_SHUT_TIME;
dump_acct_info(1);
}
else if (next_shut_acct <= TIME)
{
// Dump accounting data for shutdown sessions
- next_acct = TIME + ACCT_SHUT_TIME;
+ next_shut_acct = TIME + ACCT_SHUT_TIME;
if (shut_acct_n)
dump_acct_info(0);
}
// incoming IP
if (FD_ISSET(tunfd, &r))
{
- if ((n = read(tunfd, buf, sizeof(buf))) > 0)
+ if ((s = read(tunfd, buf, sizeof(buf))) > 0)
{
- processtun(buf, n);
+ processtun(buf, s);
}
else
{