mirror of
https://github.com/strongswan/strongswan.git
synced 2025-11-27 00:00:29 -05:00
- added OUT_OF_RES status_t
This commit is contained in:
parent
110dc83a3c
commit
7c0dcf6316
@ -152,14 +152,9 @@ static status_t get_values(private_ike_sa_id_t *this, spi_t *initiator, spi_t *r
|
|||||||
*/
|
*/
|
||||||
static status_t clone (private_ike_sa_id_t *this, ike_sa_id_t **clone_of_this)
|
static status_t clone (private_ike_sa_id_t *this, ike_sa_id_t **clone_of_this)
|
||||||
{
|
{
|
||||||
if ((this == NULL) || (clone_of_this == NULL))
|
|
||||||
{
|
|
||||||
return FAILED;
|
|
||||||
}
|
|
||||||
|
|
||||||
*clone_of_this = ike_sa_id_create(this->initiator_spi, this->responder_spi, this->role);
|
*clone_of_this = ike_sa_id_create(this->initiator_spi, this->responder_spi, this->role);
|
||||||
|
|
||||||
return (*clone_of_this == NULL) ? FAILED : SUCCESS;
|
return (*clone_of_this == NULL) ? OUT_OF_RES : SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -167,10 +162,6 @@ static status_t clone (private_ike_sa_id_t *this, ike_sa_id_t **clone_of_this)
|
|||||||
*/
|
*/
|
||||||
static status_t destroy (private_ike_sa_id_t *this)
|
static status_t destroy (private_ike_sa_id_t *this)
|
||||||
{
|
{
|
||||||
if (this == NULL)
|
|
||||||
{
|
|
||||||
return FAILED;
|
|
||||||
}
|
|
||||||
allocator_free(this);
|
allocator_free(this);
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user