aboutsummaryrefslogtreecommitdiffstats
path: root/src/charon/network/packet.c
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2006-07-10 14:24:04 +0000
committerMartin Willi <martin@strongswan.org>2006-07-10 14:24:04 +0000
commitabba7ecb9d454d2cf0b51b17c3442132435b05b0 (patch)
tree5dc0667752f515620a2b6e6a2c61b87a35dddb0f /src/charon/network/packet.c
parentc5d2d7c0230569c7995c34d538abd03c737b9281 (diff)
downloadstrongswan-abba7ecb9d454d2cf0b51b17c3442132435b05b0.tar.bz2
strongswan-abba7ecb9d454d2cf0b51b17c3442132435b05b0.tar.xz
further work done for simultaneous rekeying/delete
still some cases which cause trouble
Diffstat (limited to 'src/charon/network/packet.c')
-rw-r--r--src/charon/network/packet.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/charon/network/packet.c b/src/charon/network/packet.c
index df054c0c5..6c16a9d8d 100644
--- a/src/charon/network/packet.c
+++ b/src/charon/network/packet.c
@@ -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
*/