From 8e610ba024fc556e4cc0aede6b6f663bc646a162 Mon Sep 17 00:00:00 2001 From: Nicolas Viennot Date: Thu, 13 Jun 2013 19:38:34 -0400 Subject: [PATCH] Log IP address when spawning server/client --- tmate-slave.c | 4 ++-- tmate-ssh-server.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tmate-slave.c b/tmate-slave.c index 5ff5311c..47d521fb 100644 --- a/tmate-slave.c +++ b/tmate-slave.c @@ -222,7 +222,7 @@ static void tmate_spawn_slave_server(struct tmate_ssh_client *client) set_session_token(client, token); free(token); - tmate_debug("Spawning tmux slave server"); + tmate_debug("Spawning slave server for %s", client->ip_address); tmux_socket_fd = server_create_socket(); if (tmux_socket_fd < 0) @@ -263,7 +263,7 @@ static void tmate_spawn_slave_client(struct tmate_ssh_client *client) set_session_token(client, token); - tmate_debug("Spawn tmux slave client"); + tmate_debug("Spawning slave client for %s", client->ip_address); tmux_socket_fd = client_connect(socket_path, 0); if (tmux_socket_fd < 0) { diff --git a/tmate-ssh-server.c b/tmate-ssh-server.c index 6cf3e983..9ff08a92 100644 --- a/tmate-ssh-server.c +++ b/tmate-ssh-server.c @@ -174,7 +174,8 @@ static void handle_sigchld(void) } if (WIFSIGNALED(status)) { - child_dead = 1; child_exit_status = EXIT_FAILURE; + child_dead = 1; + child_exit_status = EXIT_FAILURE; } if (child_dead)