Skip to content

Commit

Permalink
Allow to setup beat without [back]up
Browse files Browse the repository at this point in the history
Signed-off-by: Adrien Gallouët <adrien@gallouet.fr>
  • Loading branch information
angt committed Feb 21, 2020
1 parent 7f30cdc commit 13703fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mud
Submodule mud updated 1 files
+1 −1 mud.c
7 changes: 4 additions & 3 deletions src/path.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,10 @@ gt_path(int argc, char **argv)
return 1;
}

int set_rate = argz_is_set(pathz, "rate");
int set = argz_is_set(pathz, "rate")
|| argz_is_set(pathz, "beat");

if (set_rate && !req.path.addr.ss_family) {
if (set && !req.path.addr.ss_family) {
gt_log("please specify a path\n");
return 1;
}
Expand All @@ -213,7 +214,7 @@ gt_path(int argc, char **argv)
int ret;

if (!req.path.addr.ss_family ||
(req.path.state == MUD_EMPTY && !set_rate)) {
(req.path.state == MUD_EMPTY && !set)) {
ret = gt_path_status(fd, req.path.state, &req.path.addr);
} else {
ret = ctl_reply(fd, &res, &req);
Expand Down

0 comments on commit 13703fb

Please sign in to comment.