Mercurial > hg > freeDiameter
comparison freeDiameter/p_psm.c @ 224:3caac3cd359d
Change state first, otherwise failover might re-select the same peer
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Tue, 23 Feb 2010 17:19:22 +0900 |
parents | 2465698b9f31 |
children | dcb58243e91f |
comparison
equal
deleted
inserted
replaced
223:85dc47afeac7 | 224:3caac3cd359d |
---|---|
190 TRACE_DEBUG(FULL, "'%s'\t-> '%s'\t'%s'", | 190 TRACE_DEBUG(FULL, "'%s'\t-> '%s'\t'%s'", |
191 STATE_STR(old), | 191 STATE_STR(old), |
192 STATE_STR(new_state), | 192 STATE_STR(new_state), |
193 peer->p_hdr.info.pi_diamid); | 193 peer->p_hdr.info.pi_diamid); |
194 | 194 |
195 peer->p_hdr.info.runtime.pir_state = new_state; | |
196 | |
195 if (old == STATE_OPEN) { | 197 if (old == STATE_OPEN) { |
196 CHECK_FCT( leave_open_state(peer) ); | 198 CHECK_FCT( leave_open_state(peer) ); |
197 } | 199 } |
198 | |
199 peer->p_hdr.info.runtime.pir_state = new_state; | |
200 | 200 |
201 if (new_state == STATE_OPEN) { | 201 if (new_state == STATE_OPEN) { |
202 CHECK_FCT( enter_open_state(peer) ); | 202 CHECK_FCT( enter_open_state(peer) ); |
203 } | 203 } |
204 | 204 |