aboutsummaryrefslogtreecommitdiffstats
path: root/Source/charon/encoding
diff options
context:
space:
mode:
authorJan Hutter <jhutter@hsr.ch>2005-12-02 13:20:20 +0000
committerJan Hutter <jhutter@hsr.ch>2005-12-02 13:20:20 +0000
commit5534ee84762511895f501a36dc0914783569d5ff (patch)
treefd59bc3218933c5c0cadfd535c388cc9207204bf /Source/charon/encoding
parentf2d4a4475a268bf8661d0cd084feb12581d9f795 (diff)
downloadstrongswan-5534ee84762511895f501a36dc0914783569d5ff.tar.bz2
strongswan-5534ee84762511895f501a36dc0914783569d5ff.tar.xz
- added new job type retransmit_request_job_t
- fixed memory leaks
Diffstat (limited to 'Source/charon/encoding')
-rw-r--r--Source/charon/encoding/message.c9
-rw-r--r--Source/charon/encoding/message.h8
2 files changed, 17 insertions, 0 deletions
diff --git a/Source/charon/encoding/message.c b/Source/charon/encoding/message.c
index bcc34ca96..84f174365 100644
--- a/Source/charon/encoding/message.c
+++ b/Source/charon/encoding/message.c
@@ -631,6 +631,14 @@ static status_t generate(private_message_t *this, crypter_t *crypter, signer_t*
}
/**
+ * Implementation of message_t.get_packet.
+ */
+static packet_t *get_packet (private_message_t *this)
+{
+ return this->packet->clone(this->packet);
+}
+
+/**
* Implementation of message_t.parse_header.
*/
static status_t parse_header(private_message_t *this)
@@ -1154,6 +1162,7 @@ message_t *message_create_from_packet(packet_t *packet)
this->public.parse_header = (status_t (*) (message_t *)) parse_header;
this->public.parse_body = (status_t (*) (message_t *,crypter_t*,signer_t*)) parse_body;
this->public.verify = (status_t (*) (message_t*)) verify;
+ this->public.get_packet = (packet_t * (*) (message_t*)) get_packet;
this->public.destroy = (void(*)(message_t*))destroy;
/* private values */
diff --git a/Source/charon/encoding/message.h b/Source/charon/encoding/message.h
index 8d420fbe2..dfbb10da9 100644
--- a/Source/charon/encoding/message.h
+++ b/Source/charon/encoding/message.h
@@ -282,6 +282,14 @@ struct message_t {
iterator_t * (*get_payload_iterator) (message_t *this);
/**
+ * Returns a clone of the internal stored packet_t object.
+ *
+ * @param this message_t object
+ * @return packet_t object as clone of internal one
+ */
+ packet_t * (*get_packet) (message_t *this);
+
+ /**
* @brief Destroys a message and all including objects.
*
* @param this message_t object