diff options
author | Jan Hutter <jhutter@hsr.ch> | 2005-11-21 10:58:52 +0000 |
---|---|---|
committer | Jan Hutter <jhutter@hsr.ch> | 2005-11-21 10:58:52 +0000 |
commit | 31332efad661680e171d9f287a8657cb01b54601 (patch) | |
tree | 2037029c30937f5a4bd18b75940084f3978de1bf | |
parent | ca7afb904ce758bef2e7134b6ab83b1244e76651 (diff) | |
download | strongswan-31332efad661680e171d9f287a8657cb01b54601.tar.bz2 strongswan-31332efad661680e171d9f287a8657cb01b54601.tar.xz |
- added cloning of already generated packet
-rw-r--r-- | Source/charon/message.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/charon/message.c b/Source/charon/message.c index 0e6710982..78d544769 100644 --- a/Source/charon/message.c +++ b/Source/charon/message.c @@ -442,6 +442,12 @@ static status_t generate(private_message_t *this, packet_t **packet) linked_list_iterator_t *iterator; status_t status; + if (this->packet != NULL) + { + /* already generated packet is just cloned */ + this->packet->clone(this->packet, packet); + } + if (this->exchange_type == EXCHANGE_TYPE_UNDEFINED) { return INVALID_STATE; @@ -742,7 +748,7 @@ static status_t destroy (private_message_t *this) this->payloads->destroy(this->payloads); this->parser->destroy(this->parser); -allocator_free(this); + allocator_free(this); return SUCCESS; } |