Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
oai
freediameter
Commits
d5994fa9
Commit
d5994fa9
authored
Mar 04, 2010
by
Sebastien Decugis
Browse files
Make the CEA broadcast optional
parent
f6840a7e
Changes
1
Hide whitespace changes
Inline
Side-by-side
freeDiameter/p_ce.c
View file @
d5994fa9
...
...
@@ -37,6 +37,13 @@
/* This file contains code to handle Capabilities Exchange messages (CER and CEA) and election process */
/* Compilation option:
USE_CEA_BROADCAST
Define this to enable sending multiple copies of the CEA in case of SCTP connection.
This avoids a race condition when sending an application message over a different stream
than the CEA, it might be delivered first and thus ignored.
*/
/* Save a connection as peer's principal */
static
int
set_peer_cnx
(
struct
fd_peer
*
peer
,
struct
cnxctx
**
cnx
)
{
...
...
@@ -812,7 +819,11 @@ int fd_p_ce_process_receiver(struct fd_peer * peer)
CHECK_FCT
(
fd_msg_new_answer_from_req
(
fd_g_config
->
cnf_dict
,
&
msg
,
0
)
);
CHECK_FCT
(
fd_msg_rescode_set
(
msg
,
"DIAMETER_SUCCESS"
,
NULL
,
NULL
,
0
)
);
CHECK_FCT
(
add_CE_info
(
msg
,
peer
->
p_cnxctx
,
isi
&
PI_SEC_TLS_OLD
,
isi
&
PI_SEC_NONE
)
);
#ifdef USE_CEA_BROADCAST
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... */
#else
/* USE_CEA_BROADCAST */
CHECK_FCT
(
fd_out_send
(
&
msg
,
peer
->
p_cnxctx
,
peer
,
FD_CNX_ORDERED
)
);
#endif
/* USE_CEA_BROADCAST */
/* Handshake if needed */
if
(
isi
&
PI_SEC_TLS_OLD
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment