mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 18:04:25 +09:00
session: Add SSH1 support in ssh_send_debug()
Signed-off-by: Yanis Kurganov <ykurganov@ptsecurity.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 38cb19268a)
This commit is contained in:
committed by
Andreas Schneider
parent
7a21187fb9
commit
f74d5d5df4
@@ -875,12 +875,22 @@ int ssh_send_debug (ssh_session session, const char *message, int always_display
|
|||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
if (ssh_socket_is_open(session->socket)) {
|
if (ssh_socket_is_open(session->socket)) {
|
||||||
rc = ssh_buffer_pack(session->out_buffer,
|
#ifdef WITH_SSH1
|
||||||
"bbsd",
|
if (session->version == 1) {
|
||||||
SSH2_MSG_DEBUG,
|
rc = ssh_buffer_pack(session->out_buffer,
|
||||||
always_display != 0 ? 1 : 0,
|
"bs",
|
||||||
message,
|
SSH_MSG_DEBUG,
|
||||||
0); /* empty language tag */
|
message);
|
||||||
|
} else
|
||||||
|
#endif /* WITH_SSH1 */
|
||||||
|
{
|
||||||
|
rc = ssh_buffer_pack(session->out_buffer,
|
||||||
|
"bbsd",
|
||||||
|
SSH2_MSG_DEBUG,
|
||||||
|
always_display != 0 ? 1 : 0,
|
||||||
|
message,
|
||||||
|
0); /* empty language tag */
|
||||||
|
}
|
||||||
if (rc != SSH_OK) {
|
if (rc != SSH_OK) {
|
||||||
ssh_set_error_oom(session);
|
ssh_set_error_oom(session);
|
||||||
goto error;
|
goto error;
|
||||||
|
|||||||
Reference in New Issue
Block a user