Some whitespace and code cleanups concerning the mediation extension.
This commit is contained in:
@@ -462,10 +462,7 @@ static gboolean connect_(NMVPNPlugin *plugin, NMConnection *connection,
|
|||||||
{
|
{
|
||||||
ike_sa->set_peer_cfg(ike_sa, peer_cfg);
|
ike_sa->set_peer_cfg(ike_sa, peer_cfg);
|
||||||
}
|
}
|
||||||
else
|
peer_cfg->destroy(peer_cfg);
|
||||||
{
|
|
||||||
peer_cfg->destroy(peer_cfg);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register listener, enable initiate-failure-detection hooks
|
* Register listener, enable initiate-failure-detection hooks
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ static void initiate(private_initiate_mediation_job_t *this)
|
|||||||
this->mediated_sa_id);
|
this->mediated_sa_id);
|
||||||
if (mediated_sa)
|
if (mediated_sa)
|
||||||
{
|
{
|
||||||
|
DBG1(DBG_IKE, "initiating mediation connection");
|
||||||
mediated_cfg = mediated_sa->get_peer_cfg(mediated_sa);
|
mediated_cfg = mediated_sa->get_peer_cfg(mediated_sa);
|
||||||
mediated_cfg->get_ref(mediated_cfg);
|
mediated_cfg->get_ref(mediated_cfg);
|
||||||
|
|
||||||
@@ -99,6 +100,7 @@ static void initiate(private_initiate_mediation_job_t *this)
|
|||||||
destroy(this);
|
destroy(this);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
enumerator->destroy(enumerator);
|
||||||
|
|
||||||
if (charon->connect_manager->check_and_register(charon->connect_manager,
|
if (charon->connect_manager->check_and_register(charon->connect_manager,
|
||||||
auth_cfg->get(auth_cfg, AUTH_RULE_IDENTITY),
|
auth_cfg->get(auth_cfg, AUTH_RULE_IDENTITY),
|
||||||
@@ -142,8 +144,7 @@ static void initiate(private_initiate_mediation_job_t *this)
|
|||||||
mediation_cfg->destroy(mediation_cfg);
|
mediation_cfg->destroy(mediation_cfg);
|
||||||
|
|
||||||
mediation_sa = charon->ike_sa_manager->checkout(charon->ike_sa_manager,
|
mediation_sa = charon->ike_sa_manager->checkout(charon->ike_sa_manager,
|
||||||
this->mediation_sa_id);
|
this->mediation_sa_id);
|
||||||
|
|
||||||
if (mediation_sa)
|
if (mediation_sa)
|
||||||
{
|
{
|
||||||
if (mediation_sa->initiate_mediation(mediation_sa,
|
if (mediation_sa->initiate_mediation(mediation_sa,
|
||||||
@@ -163,10 +164,9 @@ static void initiate(private_initiate_mediation_job_t *this)
|
|||||||
destroy(this);
|
destroy(this);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
charon->ike_sa_manager->checkin(charon->ike_sa_manager,
|
||||||
charon->ike_sa_manager->checkin(charon->ike_sa_manager, mediation_sa);
|
mediation_sa);
|
||||||
}
|
}
|
||||||
|
|
||||||
mediated_cfg->destroy(mediated_cfg);
|
mediated_cfg->destroy(mediated_cfg);
|
||||||
}
|
}
|
||||||
destroy(this);
|
destroy(this);
|
||||||
@@ -214,7 +214,8 @@ static void reinitiate(private_initiate_mediation_job_t *this)
|
|||||||
destroy(this);
|
destroy(this);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
charon->ike_sa_manager->checkin(charon->ike_sa_manager, mediation_sa);
|
charon->ike_sa_manager->checkin(charon->ike_sa_manager,
|
||||||
|
mediation_sa);
|
||||||
}
|
}
|
||||||
|
|
||||||
mediated_cfg->destroy(mediated_cfg);
|
mediated_cfg->destroy(mediated_cfg);
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ struct task_manager_t {
|
|||||||
*
|
*
|
||||||
* @param message message to add payloads to
|
* @param message message to add payloads to
|
||||||
* @return
|
* @return
|
||||||
* - DESTROY_ME if IKE_SA must be closed
|
* - DESTROY_ME if IKE_SA must be closed
|
||||||
* - SUCCESS otherwise
|
* - SUCCESS otherwise
|
||||||
*/
|
*/
|
||||||
status_t (*process_message) (task_manager_t *this, message_t *message);
|
status_t (*process_message) (task_manager_t *this, message_t *message);
|
||||||
@@ -121,7 +121,7 @@ struct task_manager_t {
|
|||||||
*
|
*
|
||||||
* @param message_id ID of the message to retransmit
|
* @param message_id ID of the message to retransmit
|
||||||
* @return
|
* @return
|
||||||
* - INVALID_STATE if retransmission not required
|
* - INVALID_STATE if retransmission not required
|
||||||
* - SUCCESS if retransmission sent
|
* - SUCCESS if retransmission sent
|
||||||
*/
|
*/
|
||||||
status_t (*retransmit) (task_manager_t *this, u_int32_t message_id);
|
status_t (*retransmit) (task_manager_t *this, u_int32_t message_id);
|
||||||
|
|||||||
Reference in New Issue
Block a user