If controller operations have a callback, don't succeed before hook gets called
This commit is contained in:
@@ -362,8 +362,11 @@ METHOD(job_t, initiate_execute, job_requeue_t,
|
||||
peer_cfg->destroy(peer_cfg);
|
||||
|
||||
if (ike_sa->initiate(ike_sa, listener->child_cfg, 0, NULL, NULL) == SUCCESS)
|
||||
{
|
||||
if (!listener->logger.callback)
|
||||
{
|
||||
listener->status = SUCCESS;
|
||||
}
|
||||
charon->ike_sa_manager->checkin(charon->ike_sa_manager, ike_sa);
|
||||
}
|
||||
else
|
||||
@@ -453,8 +456,11 @@ METHOD(job_t, terminate_ike_execute, job_requeue_t,
|
||||
charon->ike_sa_manager->checkin(charon->ike_sa_manager, ike_sa);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!listener->logger.callback)
|
||||
{
|
||||
listener->status = SUCCESS;
|
||||
}
|
||||
charon->ike_sa_manager->checkin_and_destroy(charon->ike_sa_manager,
|
||||
ike_sa);
|
||||
}
|
||||
@@ -560,8 +566,11 @@ METHOD(job_t, terminate_child_execute, job_requeue_t,
|
||||
|
||||
if (ike_sa->delete_child_sa(ike_sa, child_sa->get_protocol(child_sa),
|
||||
child_sa->get_spi(child_sa, TRUE), FALSE) != DESTROY_ME)
|
||||
{
|
||||
if (!listener->logger.callback)
|
||||
{
|
||||
listener->status = SUCCESS;
|
||||
}
|
||||
charon->ike_sa_manager->checkin(charon->ike_sa_manager, ike_sa);
|
||||
}
|
||||
else
|
||||
@@ -657,4 +666,3 @@ controller_t *controller_create(void)
|
||||
|
||||
return &this->public;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user