Navigation


Changeset 706:4ffbc9f1e922 in freeDiameter for libfdcore/p_expiry.c


Ignore:
Timestamp:
Feb 9, 2011, 3:26:58 PM (13 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Large UNTESTED commit with the following changes:

  • Improved DiameterIdentity? handling (esp. interationalization issues), and improve efficiency of some string operations in peers, sessions, and dictionary modules (closes #7)
  • Cleanup in the session module to free only unreferenced sessions (#16)
  • Removed fd_cpu_flush_cache(), replaced by more robust alternatives.
  • Improved peer state machine algorithm to counter SCTP multistream race condition.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libfdcore/p_expiry.c

    r691 r706  
    5959               
    6060                for (li = fd_g_peers.next; li != &fd_g_peers; li = li->next) {
    61                         struct fd_peer * peer = (struct fd_peer *)li;
    62                        
    63                         fd_cpu_flush_cache();
    64                         if (peer->p_hdr.info.runtime.pir_state != STATE_ZOMBIE)
     61                        struct fd_peer * peer = (struct fd_peer *)li->o;
     62                       
     63                        if (fd_peer_getstate(peer) != STATE_ZOMBIE)
    6564                                continue;
    6665                       
     
    7877                /* Now delete peers that are in the purge list */
    7978                while (!FD_IS_LIST_EMPTY(&purge)) {
    80                         struct fd_peer * peer = (struct fd_peer *)(purge.next);
     79                        struct fd_peer * peer = (struct fd_peer *)(purge.next->o);
    8180                        fd_list_unlink(&peer->p_hdr.chain);
    8281                        TRACE_DEBUG(INFO, "Garbage Collect: delete zombie peer '%s'", peer->p_hdr.info.pi_diamid);
     
    105104                struct fd_peer * first;
    106105               
    107                 /* Check if there are expiring sessions available */
     106                /* Check if there are expiring peers available */
    108107                if (FD_IS_LIST_EMPTY(&exp_list)) {
    109108                        /* Just wait for a change or cancelation */
     
    183182               
    184183                /* update the p_exp_timer value */
    185                 CHECK_SYS(  clock_gettime(CLOCK_REALTIME, &peer->p_exp_timer)  );
     184                CHECK_SYS_DO(  clock_gettime(CLOCK_REALTIME, &peer->p_exp_timer), { ASSERT(0); }  );
    186185                peer->p_exp_timer.tv_sec += peer->p_hdr.info.config.pic_lft;
    187186               
Note: See TracChangeset for help on using the changeset viewer.