Don't clone chunk in message.get_packet_data

This commit is contained in:
Martin Willi
2012-03-20 17:30:44 +01:00
parent 31fc14e394
commit c311d22d0f
4 changed files with 7 additions and 8 deletions
+1 -1
View File
@@ -1404,7 +1404,7 @@ METHOD(message_t, get_packet_data, chunk_t,
{
return chunk_empty;
}
return chunk_clone(this->packet->get_data(this->packet));
return this->packet->get_data(this->packet);
}
METHOD(message_t, parse_header, status_t,
+2 -2
View File
@@ -344,9 +344,9 @@ struct message_t {
packet_t * (*get_packet) (message_t *this);
/**
* Returns a clone of the internal stored packet_t data.
* Returns a chunk pointing to internal packet_t data.
*
* @return clone of the internal stored packet_t data.
* @return packet data.
*/
chunk_t (*get_packet_data) (message_t *this);