child-sa: Suppress CHILD_SA state changes if there is no change
This commit is contained in:
@@ -295,6 +295,8 @@ 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)
|
||||||
|
{
|
||||||
|
if (this->state != state)
|
||||||
{
|
{
|
||||||
DBG2(DBG_CHD, "CHILD_SA %s{%d} state change: %N => %N",
|
DBG2(DBG_CHD, "CHILD_SA %s{%d} state change: %N => %N",
|
||||||
get_name(this), this->unique_id,
|
get_name(this), this->unique_id,
|
||||||
@@ -303,6 +305,7 @@ METHOD(child_sa_t, set_state, void,
|
|||||||
charon->bus->child_state_change(charon->bus, &this->public, state);
|
charon->bus->child_state_change(charon->bus, &this->public, state);
|
||||||
this->state = state;
|
this->state = state;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
METHOD(child_sa_t, get_state, child_sa_state_t,
|
METHOD(child_sa_t, get_state, child_sa_state_t,
|
||||||
private_child_sa_t *this)
|
private_child_sa_t *this)
|
||||||
|
|||||||
Reference in New Issue
Block a user