From 6d7704c1b497341fd6dd3c27e3f64d0db062ccc2 Mon Sep 17 00:00:00 2001 From: Mauro Sardara Date: Mon, 4 Feb 2019 11:06:18 +0100 Subject: [HICN-11] Rework on transport protocols improving components modularity Change-Id: I6683ec5b494238dc93591c103d25275e89b9f267 Signed-off-by: Mauro Sardara --- libtransport/src/hicn/transport/core/interest.cc | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'libtransport/src/hicn/transport/core/interest.cc') diff --git a/libtransport/src/hicn/transport/core/interest.cc b/libtransport/src/hicn/transport/core/interest.cc index 4ea0c4419..49d452d19 100644 --- a/libtransport/src/hicn/transport/core/interest.cc +++ b/libtransport/src/hicn/transport/core/interest.cc @@ -79,16 +79,7 @@ const Name &Interest::getName() const { return name_; } -Name &Interest::getWritableName() { - if (!name_) { - if (hicn_interest_get_name(format_, (hicn_header_t *)packet_start_, - (hicn_name_t *)name_.getStructReference()) < 0) { - throw errors::MalformedPacketException(); - } - } - - return name_; -} +Name &Interest::getWritableName() { return const_cast(getName()); } Interest &Interest::setName(const Name &name) { if (hicn_interest_set_name(format_, (hicn_header_t *)packet_start_, @@ -148,4 +139,4 @@ void Interest::resetForHash() { } // end namespace core -} // end namespace transport +} // end namespace transport \ No newline at end of file -- cgit 1.2.3-korg