aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Bachmann <mabahltm@gmail.com>2016-12-19 11:10:35 +0100
committerAndreas Schneider <asn@cryptomilk.org>2017-04-11 09:55:22 +0200
commit3ec8babfaf2c2b565f837621d0af094a92252241 (patch)
tree78c8f3a79d9c86357f9367974d9aeb6ab038707f /src
parent462c7726c37537a2c40406adb8acc2fec131b76f (diff)
downloadlibssh-3ec8babfaf2c2b565f837621d0af094a92252241.tar.gz
libssh-3ec8babfaf2c2b565f837621d0af094a92252241.tar.xz
libssh-3ec8babfaf2c2b565f837621d0af094a92252241.zip
messages: Utilize the message queue for SSH_REQUEST_GLOBAL.
Signed-off-by: Max Bachmann <mabahltm@gmail.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src')
-rw-r--r--src/messages.c6
1 files 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;