Changeset 91

Show
Ignore:
Timestamp:
04/20/04 22:18:02 (9 years ago)
Author:
alexcv
Message:

fixed bug in fw_counter checks for timeout...

Location:
trunk/wifidog
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/wifidog/ChangeLog

    r90 r91  
    11# $Header$ 
    2 2004-04-19  Philippe April <papril777@yahoo.com> 
    3     * A lot of changes regarding debugging facilities and added logging 
    4     to syslog 
     22004-04-20  Alexandre Carmel-Veilleux <acv@acv.ca> 
     3        * fixed expiration time 
    54 
    652004-04-19  Philippe April <papril777@yahoo.com> 
    7     * Changed some debugging severity 
     6        * A lot of changes regarding debugging facilities and added logging 
     7        to syslog 
     8 
     92004-04-19  Philippe April <papril777@yahoo.com> 
     10        * Changed some debugging severity 
    811 
    9122004-04-19  Benoit Gr�goire  <bock@step.polymtl.ca> 
  • trunk/wifidog/src/firewall.c

    r90 r91  
    245245 
    246246                                p1 = node_find_by_ip(ip); 
    247  
    248                                 if (p1->counter == counter) { 
     247                                 
     248                                if (!(p1) || (p1->rights->last_checked + 
     249                                        (config.checkinterval * 
     250                                         config.clienttimeout)) > time(NULL)) { 
     251                                        /* Do nothing */ 
     252                                } else if (p1->counter == counter) { 
    249253                                        /* expire clients for inactivity */ 
    250254                                        debug(LOG_INFO, "Client %s was " 
     
    253257                                                p1->rights->profile); 
    254258                                        node_delete(p1); 
    255                                 } else if (!(!(p1) || !(p1->active) || 
    256                                         (p1->rights->last_checked + 
    257                                         (config.checkinterval * 
    258                                          config.clienttimeout)) > time(NULL))) { 
    259  
     259                                } else if (!(p1->active)) { 
    260260                                        p1->rights->last_checked = time(NULL); 
    261261                                        p1->counter = counter;