- switching of initiator flag only on requests

This commit is contained in:
Jan Hutter
2005-11-21 13:44:37 +00:00
parent b945904088
commit af94e7968b
+5 -3
View File
@@ -142,10 +142,12 @@ static void job_processing(private_thread_pool_t *this)
message->destroy(message); message->destroy(message);
break; break;
} }
/* we must switch the initiator flag here, because the sender /* we must switch the initiator flag when receiving a request
* interprets this flag the other way round
*/ */
ike_sa_id->switch_initiator(ike_sa_id); if (message->get_request(message))
{
ike_sa_id->switch_initiator(ike_sa_id);
}
this->worker_logger->log(this->worker_logger, CONTROL|MOST, "checking out IKE SA %lld:%lld, role %s", this->worker_logger->log(this->worker_logger, CONTROL|MOST, "checking out IKE SA %lld:%lld, role %s",
ike_sa_id->get_initiator_spi(ike_sa_id), ike_sa_id->get_initiator_spi(ike_sa_id),