summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-06-30 07:11:32 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-07-16 04:31:40 +0200
commit24739b7b757d22a4b629d410a768e4e85fb02282 (patch)
tree1bfcf3a4660c3800cb7df63bdaeec89ee686bf2c /src
parentAdd simple generator of fake journal export stream (diff)
downloadsystemd-24739b7b757d22a4b629d410a768e4e85fb02282.tar.xz
systemd-24739b7b757d22a4b629d410a768e4e85fb02282.zip
Allow addresses to be specified for --listen-... args
Hostnames still aren't accepted.
Diffstat (limited to '')
-rw-r--r--src/journal-remote/journal-remote.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/src/journal-remote/journal-remote.c b/src/journal-remote/journal-remote.c
index 5b991e9a36..22f067aa1a 100644
--- a/src/journal-remote/journal-remote.c
+++ b/src/journal-remote/journal-remote.c
@@ -698,10 +698,7 @@ static int fd_fd(const char *spec) {
if (r < 0)
return r;
- if (fd >= 0)
- return -ENOENT;
-
- return -fd;
+ return -1;
}
@@ -1118,14 +1115,8 @@ static int parse_argv(int argc, char *argv[]) {
r = fd_fd(optarg);
if (r >= 0)
http_socket = r;
- else if (r == -ENOENT)
+ else
arg_listen_http = optarg;
- else {
- log_error("Invalid port/fd specification %s: %s",
- optarg, strerror(-r));
- return -EINVAL;
- }
-
break;
case ARG_LISTEN_HTTPS:
@@ -1137,13 +1128,8 @@ static int parse_argv(int argc, char *argv[]) {
r = fd_fd(optarg);
if (r >= 0)
https_socket = r;
- else if (r == -ENOENT)
+ else
arg_listen_https = optarg;
- else {
- log_error("Invalid port/fd specification %s: %s",
- optarg, strerror(-r));
- return -EINVAL;
- }
break;