mgmt: use RouteOrigin type in Route and ControlParameters
Change-Id: I1fb7e29efbb7ae9523ca294df03478498ef04322
Refs: #3903
diff --git a/src/mgmt/nfd/rib-entry.cpp b/src/mgmt/nfd/rib-entry.cpp
index 315b4bd..619fd5e 100644
--- a/src/mgmt/nfd/rib-entry.cpp
+++ b/src/mgmt/nfd/rib-entry.cpp
@@ -36,7 +36,7 @@
Route::Route()
: m_faceId(INVALID_FACE_ID)
- , m_origin(0)
+ , m_origin(ROUTE_ORIGIN_APP)
, m_cost(0)
, m_flags(ROUTE_FLAG_CHILD_INHERIT)
{
@@ -56,7 +56,7 @@
}
Route&
-Route::setOrigin(uint64_t origin)
+Route::setOrigin(RouteOrigin origin)
{
m_origin = origin;
m_wire.reset();
@@ -159,7 +159,7 @@
}
if (val != m_wire.elements_end() && val->type() == tlv::nfd::Origin) {
- m_origin = readNonNegativeInteger(*val);
+ m_origin = static_cast<RouteOrigin>(readNonNegativeInteger(*val));
++val;
}
else {