mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 09:54:25 +09:00
messages: Utilize the message queue for SSH_REQUEST_GLOBAL.
Signed-off-by: Max Bachmann <mabahltm@gmail.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit 3ec8babfaf)
This commit is contained in:
committed by
Andreas Schneider
parent
61cbf160a0
commit
439d3039e3
@@ -1355,7 +1355,8 @@ SSH_PACKET_CALLBACK(ssh_packet_global_request){
|
|||||||
msg->global_request.bind_port);
|
msg->global_request.bind_port);
|
||||||
session->common.callbacks->global_request_function(session, msg, session->common.callbacks->userdata);
|
session->common.callbacks->global_request_function(session, msg, session->common.callbacks->userdata);
|
||||||
} else {
|
} else {
|
||||||
ssh_message_reply_default(msg);
|
ssh_message_queue(session, msg);
|
||||||
|
return rc;
|
||||||
}
|
}
|
||||||
} else if (strcmp(request, "cancel-tcpip-forward") == 0) {
|
} else if (strcmp(request, "cancel-tcpip-forward") == 0) {
|
||||||
r = ssh_buffer_unpack(packet, "sd",
|
r = ssh_buffer_unpack(packet, "sd",
|
||||||
@@ -1374,7 +1375,8 @@ SSH_PACKET_CALLBACK(ssh_packet_global_request){
|
|||||||
if(ssh_callbacks_exists(session->common.callbacks, global_request_function)) {
|
if(ssh_callbacks_exists(session->common.callbacks, global_request_function)) {
|
||||||
session->common.callbacks->global_request_function(session, msg, session->common.callbacks->userdata);
|
session->common.callbacks->global_request_function(session, msg, session->common.callbacks->userdata);
|
||||||
} else {
|
} else {
|
||||||
ssh_message_reply_default(msg);
|
ssh_message_queue(session, msg);
|
||||||
|
return rc;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
SSH_LOG(SSH_LOG_PROTOCOL, "UNKNOWN SSH_MSG_GLOBAL_REQUEST %s %d", request, want_reply);
|
SSH_LOG(SSH_LOG_PROTOCOL, "UNKNOWN SSH_MSG_GLOBAL_REQUEST %s %d", request, want_reply);
|
||||||
|
|||||||
Reference in New Issue
Block a user