Skip to content

Commit

Permalink
Remove network address question on TUI, calculate instead (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
lbgracioso committed Nov 16, 2023
1 parent a41f6e8 commit ddf4a3b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion include/cloysterhpc/presenter/PresenterNetwork.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ class PresenterNetwork : public Presenter {
struct IP {
static constexpr const auto address = "IP Address";
static constexpr const auto subnetMask = "Subnet Mask";
static constexpr const auto network = "Network Address";
static constexpr const auto gateway = "Gateway";
};

Expand Down
5 changes: 2 additions & 3 deletions src/presenter/PresenterNetwork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ void PresenterNetwork::createNetwork()
Connection::fetchAddress(interface).to_string() },
{ Messages::IP::subnetMask,
Network::fetchSubnetMask(interface).to_string() },
{ Messages::IP::network,
Network::fetchAddress(interface).to_string() },
{ Messages::IP::gateway,
Network::fetchGateway(interface).to_string() },
// Nameserver definitions
Expand All @@ -82,7 +80,8 @@ void PresenterNetwork::createNetwork()
std::size_t i = 0;
m_connection.setAddress(networkDetails[i++].second);
m_network->setSubnetMask(networkDetails[i++].second);
m_network->setAddress(networkDetails[i++].second);
m_network->setAddress(
m_network->calculateAddress(m_connection.getAddress()));
m_network->setGateway(networkDetails[i++].second);

// Domain Data
Expand Down

0 comments on commit ddf4a3b

Please sign in to comment.