Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
adigostin committed Jun 23, 2019
2 parents 065e5c3 + 429c940 commit c02dd44
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions simulator/port_tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,21 +132,21 @@ void port_tree::set_priority (uint32_t priority)

uint32_t port_tree::internal_port_path_cost() const
{
return STP_GetInternalPortPathCost(_port->bridge()->stp_bridge(), _port->port_index(), _tree_index);
return STP_GetInternalPortPathCost(_port->bridge()->stp_bridge(), (unsigned int)_port->port_index(), (unsigned int)_tree_index);
}

uint32_t port_tree::admin_internal_port_path_cost() const
{
return STP_GetAdminInternalPortPathCost(_port->bridge()->stp_bridge(), _port->port_index(), _tree_index);
return STP_GetAdminInternalPortPathCost(_port->bridge()->stp_bridge(), (unsigned int)_port->port_index(), (unsigned int)_tree_index);
}

void port_tree::set_admin_internal_port_path_cost (uint32_t value)
{
if (STP_GetAdminInternalPortPathCost (_port->bridge()->stp_bridge(), _port->port_index(), _tree_index) != value)
if (STP_GetAdminInternalPortPathCost (_port->bridge()->stp_bridge(), (unsigned int)_port->port_index(), (unsigned int)_tree_index) != value)
{
this->on_property_changing (&admin_internal_port_path_cost_property);
this->on_property_changing (&internal_port_path_cost_property);
STP_SetAdminInternalPortPathCost (_port->bridge()->stp_bridge(), _port->port_index(), _tree_index, value, ::GetMessageTime());
STP_SetAdminInternalPortPathCost (_port->bridge()->stp_bridge(), (unsigned int)_port->port_index(), (unsigned int)_tree_index, value, ::GetMessageTime());
this->on_property_changed (&internal_port_path_cost_property);
this->on_property_changed (&admin_internal_port_path_cost_property);
}
Expand Down
4 changes: 2 additions & 2 deletions tests/test_helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,14 @@ bool exchange_bpdus (test_bridge& one, size_t one_port, test_bridge& other, size
{
auto bpdu = std::move(one.tx_queues[one_port].back());
one.tx_queues[one_port].pop();
STP_OnBpduReceived (other, other_port, bpdu.data(), (unsigned int) bpdu.size(), 0);
STP_OnBpduReceived (other, (unsigned int)other_port, bpdu.data(), (unsigned int) bpdu.size(), 0);
exchanged = true;
}
else if (!other.tx_queues[other_port].empty())
{
auto bpdu = std::move(other.tx_queues[other_port].back());
other.tx_queues[other_port].pop();
STP_OnBpduReceived (one, one_port, bpdu.data(), (unsigned int) bpdu.size(), 0);
STP_OnBpduReceived (one, (unsigned int)one_port, bpdu.data(), (unsigned int) bpdu.size(), 0);
exchanged = true;
}
else
Expand Down

0 comments on commit c02dd44

Please sign in to comment.