[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Utilize the message queue for SSH_REQUEST_GLOBAL.


Signed-off-by: Max Bachmann <mabahltm@xxxxxxxxx>
---
 src/messages.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/messages.c b/src/messages.c
index 2b139fb..9bbfc4c 100644
--- a/src/messages.c
+++ b/src/messages.c
@@ -1398,7 +1398,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",
@@ -1417,7 +1418,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@xxxxxxxxxxx") == 0) {
         msg->global_request.type = SSH_GLOBAL_REQUEST_KEEPALIVE;
-- 
2.7.4


Archive administrator: postmaster@lists.cynapses.org