Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some compile errors on Arch Linux #20

Merged
merged 5 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
node-version: [12.x, 14.x, 16.x]
node-version: [18.x, 20.x]

steps:
# Install node-gyp
- name: Install node-gyp
run: npm install -g node-gyp
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
Expand Down
21 changes: 6 additions & 15 deletions src/nuclear/src/extension/network/NUClearNetwork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <cerrno>
#include <cstring>
#include <set>
#include <system_error>
#include <utility>

#include "../../util/network/get_interfaces.hpp"
Expand Down Expand Up @@ -171,9 +172,7 @@ namespace extension {

// Swap our address so the rest of the information is anys
if (address.sock.sa_family == AF_INET) { address.ipv4.sin_addr.s_addr = htonl(INADDR_ANY); }
else if (address.sock.sa_family == AF_INET6) {
address.ipv6.sin6_addr = IN6ADDR_ANY_INIT;
}
else if (address.sock.sa_family == AF_INET6) { address.ipv6.sin6_addr = IN6ADDR_ANY_INIT; }

// Make our socket
announce_fd = ::socket(address.sock.sa_family, SOCK_DGRAM, IPPROTO_UDP);
Expand Down Expand Up @@ -232,9 +231,7 @@ namespace extension {
sizeof(ip_mreq));

if (status < 0) { last_network_errno = network_errno; }
else {
connected_count++;
}
else { connected_count++; }
}
}

Expand Down Expand Up @@ -552,15 +549,11 @@ namespace extension {
++it;
}
// Remove them from the list
else {
it = qit->second.targets.erase(it);
}
else { it = qit->second.targets.erase(it); }
}

if (qit->second.targets.empty()) { qit = send_queue.erase(qit); }
else {
++qit;
}
else { ++qit; }
}
}

Expand Down Expand Up @@ -647,9 +640,7 @@ namespace extension {
}
}
// They're old but at least they're not timing out
else {
remote->last_update = std::chrono::steady_clock::now();
}
else { remote->last_update = std::chrono::steady_clock::now(); }
} break;
case LEAVE: {

Expand Down
Loading