Navigation


Changeset 233:87ca7b66a90c in freeDiameter


Ignore:
Timestamp:
Mar 4, 2010, 5:24:31 PM (14 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Make the CEA broadcast optional

File:
1 edited

Legend:

Unmodified
Added
Removed
  • freeDiameter/p_ce.c

    r230 r233  
    3838/* This file contains code to handle Capabilities Exchange messages (CER and CEA) and election process */
    3939
     40/* Compilation option:
     41 USE_CEA_BROADCAST
     42        Define this to enable sending multiple copies of the CEA in case of SCTP connection.
     43        This avoids a race condition when sending an application message over a different stream
     44        than the CEA, it might be delivered first and thus ignored.
     45*/
     46
    4047/* Save a connection as peer's principal */
    4148static int set_peer_cnx(struct fd_peer * peer, struct cnxctx **cnx)
     
    813820        CHECK_FCT( fd_msg_rescode_set(msg, "DIAMETER_SUCCESS", NULL, NULL, 0 ) );
    814821        CHECK_FCT( add_CE_info(msg, peer->p_cnxctx, isi & PI_SEC_TLS_OLD, isi & PI_SEC_NONE) );
     822#ifdef USE_CEA_BROADCAST
    815823        CHECK_FCT( fd_out_send(&msg, peer->p_cnxctx, peer, (isi & PI_SEC_TLS_OLD) ? FD_CNX_ORDERED : FD_CNX_BROADCAST) ); /* Broadcast in order to avoid further messages sent over a different stream be delivered first... */
     824#else /* USE_CEA_BROADCAST */
     825        CHECK_FCT( fd_out_send(&msg, peer->p_cnxctx, peer, FD_CNX_ORDERED ) );
     826#endif /* USE_CEA_BROADCAST */
    816827       
    817828        /* Handshake if needed */
Note: See TracChangeset for help on using the changeset viewer.