Merge pull request #1312 from mazunki/master

Changed a setting to include {gwaddr} by default
pull/1360/head^2
Alex 2022-01-24 09:23:43 +01:00 committed by GitHub
commit 8974bbf7b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -68,7 +68,10 @@ inline int close(FILE* fp, pid_t pid) {
inline FILE* open(const std::string& cmd, int& pid) { inline FILE* open(const std::string& cmd, int& pid) {
if (cmd == "") return nullptr; if (cmd == "") return nullptr;
int fd[2]; int fd[2];
pipe(fd); if (pipe(fd) != 0){
spdlog::error("Unable to pipe fd");
return nullptr;
}
pid_t child_pid = fork(); pid_t child_pid = fork();

View File

@ -78,7 +78,7 @@ waybar::modules::Network::Network(const std::string &id, const Json::Value &conf
family_(config["family"] == "ipv6" ? AF_INET6 : AF_INET), family_(config["family"] == "ipv6" ? AF_INET6 : AF_INET),
efd_(-1), efd_(-1),
ev_fd_(-1), ev_fd_(-1),
want_route_dump_(false), want_route_dump_(true),
want_link_dump_(false), want_link_dump_(false),
want_addr_dump_(false), want_addr_dump_(false),
dump_in_progress_(false), dump_in_progress_(false),
@ -106,7 +106,7 @@ waybar::modules::Network::Network(const std::string &id, const Json::Value &conf
} }
if (!config_["interface"].isString()) { if (!config_["interface"].isString()) {
// "interface" isn't configure, then try to guess the external // "interface" isn't configured, then try to guess the external
// interface currently used for internet. // interface currently used for internet.
want_route_dump_ = true; want_route_dump_ = true;
} else { } else {