From abba7ecb9d454d2cf0b51b17c3442132435b05b0 Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Mon, 10 Jul 2006 14:24:04 +0000 Subject: further work done for simultaneous rekeying/delete still some cases which cause trouble --- src/charon/network/packet.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'src/charon/network/packet.c') 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 */ -- cgit v1.2.3