Changeset 67

Show
Ignore:
Timestamp:
04/14/04 21:48:57 (5 years ago)
Author:
alexcv
Message:

Proper length delays for checks.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wifidog/ChangeLog

    r65 r67  
    11# $Header$ 
     22004-04-14  Alexandre Carmel-Veilleux <acv@acv.ca> 
     3        * Fixed clean up so it happens at the right time. 
     4 
    252004-04-14  Alexandre Carmel-Veilleux <acv@acv.ca> 
    36        * Major retooling of insert_userclass(), fixed seg fault. 
  • trunk/wifidog/src/auth.c

    r65 r67  
    104104                tmp_ur->profile = profile; 
    105105                tmp_ur->start_time = time(NULL); 
     106                tmp_ur->last_checked = time(NULL); 
    106107                tmp_ur->end_time = tmp_ur->start_time + (time_t)tmp_uc->timeout; 
    107108                 
  • trunk/wifidog/src/firewall.c

    r64 r67  
    206206 
    207207                                p1 = node_find_by_ip(ip); 
    208                                 if (!(p1) || !(p1->active)) { 
     208                                if (!(p1) || !(p1->active) || 
     209                                        (p1->rights->last_checked + 
     210                                         (config.checkinterval * 
     211                                          config.clienttimeout)) > time(NULL)) { 
    209212                                        debug(D_LOG_DEBUG, "Client %s not " 
    210213                                                "active", ip); 
    211214                                } else { 
     215                                        p1->rights->last_checked = time(NULL); 
    212216                                        p1->counter = counter; 
    213217 
  • trunk/wifidog/src/userclasses.h

    r45 r67  
    3939typedef struct _user_rights { 
    4040        int     profile;        /* keyed to a global profile */ 
    41         time_t  start_time;     /* when connection started */ 
    42         time_t  end_time;       /* start_time + timeout */ 
     41        time_t  start_time,     /* when connection started */ 
     42                end_time,       /* start_time + timeout */ 
     43                last_checked;   /* time of last check */ 
    4344} UserRights; 
    4445