child-sa: Suppress CHILD_SA state changes if there is no change
This commit is contained in:
@@ -296,12 +296,15 @@ METHOD(child_sa_t, get_config, child_cfg_t*,
|
|||||||
METHOD(child_sa_t, set_state, void,
|
METHOD(child_sa_t, set_state, void,
|
||||||
private_child_sa_t *this, child_sa_state_t state)
|
private_child_sa_t *this, child_sa_state_t state)
|
||||||
{
|
{
|
||||||
DBG2(DBG_CHD, "CHILD_SA %s{%d} state change: %N => %N",
|
if (this->state != state)
|
||||||
get_name(this), this->unique_id,
|
{
|
||||||
child_sa_state_names, this->state,
|
DBG2(DBG_CHD, "CHILD_SA %s{%d} state change: %N => %N",
|
||||||
child_sa_state_names, state);
|
get_name(this), this->unique_id,
|
||||||
charon->bus->child_state_change(charon->bus, &this->public, state);
|
child_sa_state_names, this->state,
|
||||||
this->state = state;
|
child_sa_state_names, state);
|
||||||
|
charon->bus->child_state_change(charon->bus, &this->public, state);
|
||||||
|
this->state = state;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
METHOD(child_sa_t, get_state, child_sa_state_t,
|
METHOD(child_sa_t, get_state, child_sa_state_t,
|
||||||
|
|||||||
Reference in New Issue
Block a user