summaryrefslogtreecommitdiff
path: root/src/activate/activate.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/activate/activate.c')
-rw-r--r--src/activate/activate.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/activate/activate.c b/src/activate/activate.c
index f0944aac5c..3198f7de98 100644
--- a/src/activate/activate.c
+++ b/src/activate/activate.c
@@ -127,7 +127,7 @@ static int open_sockets(int *epoll_fd, bool accept) {
_cleanup_free_ char *name = NULL;
getsockname_pretty(fd, &name);
- log_info("Listening on %s.", strna(name));
+ log_info("Listening on %s as %i.", strna(name), fd);
r = add_epoll(*epoll_fd, fd);
if (r < 0)
@@ -381,6 +381,10 @@ int main(int argc, char **argv, char **envp) {
n = open_sockets(&epoll_fd, arg_accept);
if (n < 0)
return EXIT_FAILURE;
+ if (n == 0) {
+ log_error("No sockets to listen on specified or passed in.");
+ return EXIT_FAILURE;
+ }
for (;;) {
struct epoll_event event;
@@ -394,7 +398,7 @@ int main(int argc, char **argv, char **envp) {
return EXIT_FAILURE;
}
- log_info("Communication attempt on fd:%d", event.data.fd);
+ log_info("Communication attempt on fd %i.", event.data.fd);
if (arg_accept) {
r = do_accept(argv[optind], argv + optind, envp,
event.data.fd);