Navigation


Changeset 1010:357c2f892d24 in freeDiameter for libfdcore/p_ce.c


Ignore:
Timestamp:
Mar 26, 2013, 12:39:32 AM (11 years ago)
Author:
Sebastien Decugis <sdecugis@freediameter.net>
Branch:
default
Phase:
public
Message:

Implement a new counter on pending answers to send back to a peer.
Function fd_peer_get_load_pending updated to retrieve this counter as well.
When a peer has answers pending, the connection is not immediately teared down
upon DPR/DPA exchange, but a GRACE_TIMEOUT delay (default 1 sec) is granted.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libfdcore/p_ce.c

    r975 r1010  
    919919        }
    920920       
     921        /* Update the counter to match with the answer being sent */
     922        CHECK_POSIX( pthread_mutex_lock(&peer->p_state_mtx) );
     923        peer->p_reqin_count++;
     924        CHECK_POSIX( pthread_mutex_unlock(&peer->p_state_mtx) );
     925
    921926        /* Reply a CEA */
    922927        CHECK_FCT( fd_msg_new_answer_from_req ( fd_g_config->cnf_dict, &msg, 0 ) );
Note: See TracChangeset for help on using the changeset viewer.