From 3ec8babfaf2c2b565f837621d0af094a92252241 Mon Sep 17 00:00:00 2001 From: Max Bachmann Date: Mon, 19 Dec 2016 11:10:35 +0100 Subject: [PATCH] messages: Utilize the message queue for SSH_REQUEST_GLOBAL. Signed-off-by: Max Bachmann Reviewed-by: Andreas Schneider --- src/messages.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/messages.c b/src/messages.c index 7165d7cd..9a06e2a0 100644 --- a/src/messages.c +++ b/src/messages.c @@ -1406,7 +1406,8 @@ SSH_PACKET_CALLBACK(ssh_packet_global_request){ msg->global_request.bind_port); session->common.callbacks->global_request_function(session, msg, session->common.callbacks->userdata); } else { - ssh_message_reply_default(msg); + ssh_message_queue(session, msg); + return rc; } } else if (strcmp(request, "cancel-tcpip-forward") == 0) { r = ssh_buffer_unpack(packet, "sd", @@ -1425,7 +1426,8 @@ SSH_PACKET_CALLBACK(ssh_packet_global_request){ if(ssh_callbacks_exists(session->common.callbacks, global_request_function)) { session->common.callbacks->global_request_function(session, msg, session->common.callbacks->userdata); } else { - ssh_message_reply_default(msg); + ssh_message_queue(session, msg); + return rc; } } else if(strcmp(request, "keepalive@openssh.com") == 0) { msg->global_request.type = SSH_GLOBAL_REQUEST_KEEPALIVE;