From d35f9469120c2eb4062fb19050ebd2e0d5e7b0f8 Mon Sep 17 00:00:00 2001 From: Mauro Sardara Date: Thu, 21 Mar 2019 11:01:39 +0100 Subject: [HICN-135] Fix setLifetime function. Change-Id: Ic0423407082e0909584a793f266e5b5fb4fc71b4 Signed-off-by: Mauro Sardara --- libtransport/src/hicn/transport/core/packet.cc | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'libtransport/src/hicn/transport/core/packet.cc') diff --git a/libtransport/src/hicn/transport/core/packet.cc b/libtransport/src/hicn/transport/core/packet.cc index ea9666ff7..c5c2b9796 100644 --- a/libtransport/src/hicn/transport/core/packet.cc +++ b/libtransport/src/hicn/transport/core/packet.cc @@ -140,22 +140,6 @@ std::size_t Packet::headerSize() const { reinterpret_cast(packet_start_)); } -void Packet::setLifetime(uint32_t lifetime) { - if (hicn_interest_set_lifetime(packet_start_, lifetime) < 0) { - throw errors::MalformedPacketException(); - } -} - -uint32_t Packet::getLifetime() const { - uint32_t lifetime = 0; - - if (hicn_packet_get_lifetime(packet_start_, &lifetime) < 0) { - throw errors::MalformedPacketException(); - } - - return lifetime; -} - Packet &Packet::appendPayload(std::unique_ptr &&payload) { separateHeaderPayload(); -- cgit 1.2.3-korg