fixed set_message_id() on IKE_SA

added missing bus->message() hook invocation
whitespace cleanups
This commit is contained in:
Martin Willi
2008-11-24 13:59:30 +00:00
parent b09ca74720
commit f1f09810fb
2 changed files with 132 additions and 129 deletions
+2 -2
View File
@@ -416,11 +416,11 @@ static void set_message_id(private_ike_sa_t *this, bool initiate, u_int32_t mid)
{
if (initiate)
{
this->task_manager->reset(this->task_manager, UINT_MAX, mid);
this->task_manager->reset(this->task_manager, mid, UINT_MAX);
}
else
{
this->task_manager->reset(this->task_manager, mid, UINT_MAX);
this->task_manager->reset(this->task_manager, UINT_MAX, mid);
}
}
+4 -1
View File
@@ -445,15 +445,18 @@ static status_t build_request(private_task_manager_t *this)
DESTROY_IF(this->initiating.packet);
status = this->ike_sa->generate_message(this->ike_sa, message,
&this->initiating.packet);
message->destroy(message);
if (status != SUCCESS)
{
/* message generation failed. There is nothing more to do than to
* close the SA */
message->destroy(message);
flush(this);
return DESTROY_ME;
}
charon->bus->message(charon->bus, message, FALSE);
message->destroy(message);
return retransmit(this, this->initiating.mid);
}