[ previous ] [ next ] [ threads ]
 
 From:  "=?ISO-8859-1?Q?R=F6nnblom_Jan=E5ke_?= /Teknous" <jan dash ake dot ronnblom at skeria dot skelleftea dot se>
 To:  m0n0wall at lists dot m0n0 dot ch
 Subject:  Re: [m0n0wall] problem with captiveportal (locking problem?) - sessions gone m
 Date:  Wed, 12 Dec 2007 17:04:13 +0100
YvesDM <ydmlog at gmail dot com> writes:
>> Perhaps the "real" fix should either set the $lastact to time() if its 0:
>>
>> $lastact = $lastact ? $lastact : time();
>>
>> This would loggoff the user when the timeout has expired and the user
>> hasn't
>> sent any data.
>>
>
>Yes indeed, I get it.
>I will try it out as soon as my holidays are over ;-)
>
If you only want this patch you should write it as such:

/* if the user has logged on but not sent any trafic they will never be logged
out.
   We "fix" this by setting lastact to the login timestamp */
$lastact = $lastact ? $lastact : $cpdb[$i][0];

I did also write another patch for a bigger problem (atleast for us) so please
check
my other mail.

=====================================================


Assistentgatan 23
931 77 Skelleftea (Sweden)
-----------------------------------------------------
Phone  : +46-910-58 54 24
Mobile : 070-397 07 43
Fax    : +46-910-58 54 99
URL    : http://skeria.skelleftea.se
-----------------------------------------------------
"Those who do not understand Unix are condemned to reinvent it, poorly." --
Henry Spencer