diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-06-30 01:11:32 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-07-15 22:31:40 -0400 |
commit | 24739b7b757d22a4b629d410a768e4e85fb02282 (patch) | |
tree | 1bfcf3a4660c3800cb7df63bdaeec89ee686bf2c /src/journal-remote | |
parent | d3b7fd541b97a946bc0c351357d0f2d277f119cd (diff) |
Allow addresses to be specified for --listen-... args
Hostnames still aren't accepted.
Diffstat (limited to 'src/journal-remote')
-rw-r--r-- | src/journal-remote/journal-remote.c | 20 |
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; |