summaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
Diffstat (limited to 'extras')
-rw-r--r--extras/vom/vom/lldp_binding_cmds.cpp10
-rw-r--r--extras/vom/vom/lldp_global_cmds.cpp8
2 files changed, 8 insertions, 10 deletions
diff --git a/extras/vom/vom/lldp_binding_cmds.cpp b/extras/vom/vom/lldp_binding_cmds.cpp
index 8c27579a643..02ed8cd450a 100644
--- a/extras/vom/vom/lldp_binding_cmds.cpp
+++ b/extras/vom/vom/lldp_binding_cmds.cpp
@@ -26,8 +26,7 @@ bind_cmd::bind_cmd(HW::item<bool>& item,
: rpc_cmd(item)
, m_itf(itf)
, m_port_desc(port_desc)
-{
-}
+{}
bool
bind_cmd::operator==(const bind_cmd& other) const
@@ -44,8 +43,8 @@ bind_cmd::issue(connection& con)
payload.sw_if_index = m_itf.value();
payload.enable = 1;
- memcpy(payload.port_desc, m_port_desc.c_str(),
- std::min(sizeof(payload.port_desc), m_port_desc.length()));
+ memcpy(payload.port_desc.buf, m_port_desc.c_str(), m_port_desc.length());
+ payload.port_desc.length = m_port_desc.length();
VAPI_CALL(req.execute());
@@ -65,8 +64,7 @@ bind_cmd::to_string() const
unbind_cmd::unbind_cmd(HW::item<bool>& item, const handle_t& itf)
: rpc_cmd(item)
, m_itf(itf)
-{
-}
+{}
bool
unbind_cmd::operator==(const unbind_cmd& other) const
diff --git a/extras/vom/vom/lldp_global_cmds.cpp b/extras/vom/vom/lldp_global_cmds.cpp
index 7ea9b7895ea..32931a621f0 100644
--- a/extras/vom/vom/lldp_global_cmds.cpp
+++ b/extras/vom/vom/lldp_global_cmds.cpp
@@ -25,8 +25,7 @@ config_cmd::config_cmd(HW::item<bool>& item,
, m_system_name(system_name)
, m_tx_hold(tx_hold)
, m_tx_interval(tx_interval)
-{
-}
+{}
bool
config_cmd::operator==(const config_cmd& other) const
@@ -43,8 +42,9 @@ config_cmd::issue(connection& con)
payload.tx_hold = m_tx_hold;
payload.tx_interval = m_tx_interval;
- memcpy(payload.system_name, m_system_name.c_str(),
- std::min(sizeof(payload.system_name), m_system_name.length()));
+ memcpy(
+ payload.system_name.buf, m_system_name.c_str(), m_system_name.length());
+ payload.system_name.length = m_system_name.length();
VAPI_CALL(req.execute());