aboutsummaryrefslogtreecommitdiffstats
path: root/libtransport/src/hicn/transport/core/interest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libtransport/src/hicn/transport/core/interest.cc')
-rw-r--r--libtransport/src/hicn/transport/core/interest.cc13
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