Skip to content

Commit

Permalink
doveadm-server: Show UNIX socket connections as <local> in process title
Browse files Browse the repository at this point in the history
Earlier they were shown as empty string.
  • Loading branch information
sirainen committed Dec 13, 2016
1 parent 731eee9 commit d48b82d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/doveadm/client-connection.c
Expand Up @@ -551,7 +551,8 @@ client_connection_create(int fd, int listen_fd, bool ssl)
return NULL;
doveadm_print_init(DOVEADM_PRINT_TYPE_SERVER);

conn->name = p_strdup(pool, net_ip2addr(&conn->remote_ip));
conn->name = conn->remote_ip.family == 0 ? "<local>" :
p_strdup(pool, net_ip2addr(&conn->remote_ip));
conn->io = io_add(fd, IO_READ, client_connection_input, conn);
conn->input = i_stream_create_fd(fd, MAX_INBUF_SIZE, FALSE);
conn->output = o_stream_create_fd(fd, (size_t)-1, FALSE);
Expand Down

0 comments on commit d48b82d

Please sign in to comment.