From 0d86688da2e27c4ce83558122e2a2c409298f921 Mon Sep 17 00:00:00 2001 From: Ahsen Kamal Date: Tue, 21 Feb 2023 04:07:15 +0530 Subject: [PATCH] rename discon_msg to peer_discon_msg Signed-off-by: Ahsen Kamal Reviewed-by: Jakub Jelen (cherry picked from commit e2b89dec9d8f5cb5e4aa9fe3a228a7ae1fb76d13) --- include/libssh/session.h | 2 +- src/session.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/libssh/session.h b/include/libssh/session.h index cf219c2a..5606823e 100644 --- a/include/libssh/session.h +++ b/include/libssh/session.h @@ -140,7 +140,7 @@ struct ssh_session_struct { ssh_string banner; /* that's the issue banner from the server */ - char *discon_msg; /* disconnect message from + char *peer_discon_msg; /* disconnect message from the remote host */ char *disconnect_message; /* disconnect message to be set */ ssh_buffer in_buffer; diff --git a/src/session.c b/src/session.c index 51c832c5..33551cc4 100644 --- a/src/session.c +++ b/src/session.c @@ -838,11 +838,11 @@ const char *ssh_get_disconnect_message(ssh_session session) { if (session->session_state != SSH_SESSION_STATE_DISCONNECTED) { ssh_set_error(session, SSH_REQUEST_DENIED, "Connection not closed yet"); - } else if(!session->discon_msg) { + } else if(!session->peer_discon_msg) { ssh_set_error(session, SSH_FATAL, "Connection correctly closed but no disconnect message"); } else { - return session->discon_msg; + return session->peer_discon_msg; } return NULL;