diff options
author | Mauro Sardara <msardara@cisco.com> | 2019-02-04 11:06:18 +0100 |
---|---|---|
committer | Alberto Compagno <acompagn+fdio@cisco.com> | 2019-03-05 09:56:19 +0000 |
commit | 6d7704c1b497341fd6dd3c27e3f64d0db062ccc2 (patch) | |
tree | 668c6820653cd84da8474d330d2807a8765f96b5 /libtransport/src/hicn/transport/core/interest.cc | |
parent | ca66305af16e2f8d8f271218ea71f132e6c21916 (diff) |
[HICN-11] Rework on transport protocols improving components modularity
Change-Id: I6683ec5b494238dc93591c103d25275e89b9f267
Signed-off-by: Mauro Sardara <msardara@cisco.com>
Diffstat (limited to 'libtransport/src/hicn/transport/core/interest.cc')
-rw-r--r-- | libtransport/src/hicn/transport/core/interest.cc | 13 |
1 files changed, 2 insertions, 11 deletions
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<Name &>(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 |