changeset 80:56f0b629e036

Fix race condition
author Sebastien Decugis <sdecugis@nict.go.jp>
date Wed, 02 Dec 2009 14:00:15 +0900
parents d273a2ce19c8
children 66a00b701f02
files freeDiameter/p_dp.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/freeDiameter/p_dp.c	Wed Dec 02 10:25:59 2009 +0900
+++ b/freeDiameter/p_dp.c	Wed Dec 02 14:00:15 2009 +0900
@@ -163,12 +163,12 @@
 	/* Save the value also in the peer */
 	peer->p_hdr.info.runtime.pir_lastDC = val.u32;
 	
-	/* Now send this message */
-	CHECK_FCT( fd_out_send(&msg, NULL, peer) );
-	
 	/* Update the peer state and timer */
 	CHECK_FCT( fd_psm_change_state(peer, STATE_CLOSING) );
 	fd_psm_next_timeout(peer, 0, DPR_TIMEOUT);
 	
+	/* Now send the DPR message */
+	CHECK_FCT( fd_out_send(&msg, NULL, peer) );
+	
 	return 0;
 }
"Welcome to our mercurial repository"