further work done for simultaneous rekeying/delete

still some cases which cause trouble
This commit is contained in:
Martin Willi
2006-07-10 14:24:04 +00:00
parent c5d2d7c023
commit abba7ecb9d
15 changed files with 312 additions and 229 deletions
+1 -17
View File
@@ -133,39 +133,23 @@ static void destroy(private_packet_t *this)
static packet_t *clone(private_packet_t *this)
{
private_packet_t *other = (private_packet_t*)packet_create();
if (this->destination != NULL)
{
other->destination = this->destination->clone(this->destination);
}
else
{
other->destination = NULL;
}
if (this->source != NULL)
{
other->source = this->source->clone(this->source);
}
else
{
other->source = NULL;
}
/* only clone existing chunks :-) */
if (this->data.ptr != NULL)
{
other->data.ptr = clalloc(this->data.ptr,this->data.len);
other->data.len = this->data.len;
}
else
{
other->data = CHUNK_INITIALIZER;
}
return &(other->public);
}
/*
* Documented in header
*/