Navigation


Changeset 37:cc3c59fe98fe in freeDiameter for freeDiameter/p_expiry.c


Ignore:
Timestamp:
Nov 5, 2009, 2:28:46 PM (15 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Lot of cleanups in peer structure management

File:
1 edited

Legend:

Unmodified
Added
Removed
  • freeDiameter/p_expiry.c

    r36 r37  
    6161                        struct fd_peer * peer = (struct fd_peer *)li;
    6262                       
    63                         if (peer->p_hdr.info.pi_state != STATE_ZOMBIE)
     63                        if (peer->p_hdr.info.runtime.pir_state != STATE_ZOMBIE)
    6464                                continue;
    6565                       
    66                         if (peer->p_hdr.info.pi_flags.persist == PI_PRST_ALWAYS)
     66                        if (peer->p_hdr.info.config.pic_flags.persist == PI_PRST_ALWAYS)
    6767                                continue; /* This peer was not supposed to terminate, keep it in the list for debug */
    6868                       
     
    158158        CHECK_FCT_DO( fd_thr_term(&exp_thr), );
    159159        CHECK_POSIX( pthread_mutex_lock(&exp_mtx) );
    160        
    161160        while (!FD_IS_LIST_EMPTY(&exp_list)) {
    162161                struct fd_peer * peer = (struct fd_peer *)(exp_list.next->o);
    163162                fd_list_unlink(&peer->p_expiry );
    164163        }
    165        
    166164        CHECK_POSIX( pthread_mutex_unlock(&exp_mtx) );
     165       
    167166        CHECK_FCT_DO( fd_thr_term(&gc_thr), );
    168167        return 0;
     
    180179       
    181180        /* if peer expires */
    182         if (peer->p_hdr.info.pi_flags.exp) {
     181        if (peer->p_hdr.info.config.pic_flags.exp) {
    183182                struct fd_list * li;
    184183               
    185184                /* update the p_exp_timer value */
    186185                CHECK_SYS(  clock_gettime(CLOCK_REALTIME, &peer->p_exp_timer)  );
    187                 peer->p_exp_timer.tv_sec += peer->p_hdr.info.pi_lft;
     186                peer->p_exp_timer.tv_sec += peer->p_hdr.info.config.pic_lft;
    188187               
    189188                /* add to the expiry list in appropriate position (probably around the end) */
Note: See TracChangeset for help on using the changeset viewer.