commit 431dae3c2eb57909fb781d6eef504e46797220ce
parent ac9f1215fb01739f7fac2ac584135cf7b74a818b
Author: finwo <finwo@pm.me>
Date: Sat, 3 Jan 2026 19:36:03 +0100
2.18
Diffstat:
3 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,8 +1,12 @@
-2.17
+2.18 [KK 2008-10-08]
+- Improved command line parsing, so that when --checkup-interval is
+ used, suppression of "--wakeup-interval 0" is no longer needed.
+
+2.17 [KK 2008-10-07]
- Type sizes reported in "xr -V"
- Fixed nasty bug in sys/fdwrite.cc
-2.16
+2.16 [KK 2008-10-05]
- Enhanced web interface to show debug, verbose and traffic log states
- Altering parameters for the web interface get sent in encoded form
- Option --log-traffic was renamed to --log-traffic-dir for
diff --git a/Makefile b/Makefile
@@ -1,7 +1,7 @@
# Top-level Makefile for XR
# -------------------------
-VER = 2.17
+VER = 2.18
BINDIR = /usr/sbin
TAR = /tmp/crossroads-$(VER).tar.gz
AUTHOR = Karel Kubat <karel@kubat.nl>
diff --git a/xr/config/parsecmdline.cc b/xr/config/parsecmdline.cc
@@ -52,7 +52,7 @@ void Config::parsecmdline (int ac, char **av) {
int opt;
bool backend_set = false;
- bool tryout = false;
+ bool tryout = false, wakeup_used = false;
string current_hostmatch = "";
# ifdef HAVE_GETOPT_LONG
@@ -166,6 +166,7 @@ void Config::parsecmdline (int ac, char **av) {
break;
case 'w':
wakeup = setinteger (optarg);
+ wakeup_used = true;
break;
case 'X':
add_xr_version = true;
@@ -188,10 +189,14 @@ void Config::parsecmdline (int ac, char **av) {
throw static_cast<Error>
("No backend defined, use '-b...' at least once, "
"or try 'xr -h' for usage");
- if (checkup && wakeup)
- throw static_cast<Error>
- ("Use either --checkup-interval or --wakeup-interval, but not "
- "both");
+ if (checkup && wakeup) {
+ if (!wakeup_used)
+ wakeup = 0;
+ else
+ throw static_cast<Error>
+ ("Use either --checkup-interval or --wakeup-interval, "
+ "but not both");
+ }
// In tryout mode, stop now.
if (tryout)