channel_rcv_close: indentation
Signed-off-by: Tom Deseyn <tom.deseyn@gmail.com> Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Этот коммит содержится в:
родитель
44dfee778f
Коммит
a4b8045fb8
@ -666,37 +666,37 @@ static bool ssh_channel_has_unread_data(ssh_channel channel)
|
||||
}
|
||||
|
||||
SSH_PACKET_CALLBACK(channel_rcv_close) {
|
||||
ssh_channel channel;
|
||||
(void)user;
|
||||
(void)type;
|
||||
ssh_channel channel;
|
||||
(void)user;
|
||||
(void)type;
|
||||
|
||||
channel = channel_from_msg(session,packet);
|
||||
if (channel == NULL) {
|
||||
SSH_LOG(SSH_LOG_FUNCTIONS, "%s", ssh_get_error(session));
|
||||
channel = channel_from_msg(session,packet);
|
||||
if (channel == NULL) {
|
||||
SSH_LOG(SSH_LOG_FUNCTIONS, "%s", ssh_get_error(session));
|
||||
|
||||
return SSH_PACKET_USED;
|
||||
}
|
||||
return SSH_PACKET_USED;
|
||||
}
|
||||
|
||||
SSH_LOG(SSH_LOG_PACKET,
|
||||
"Received close on channel (%d:%d)",
|
||||
channel->local_channel,
|
||||
channel->remote_channel);
|
||||
SSH_LOG(SSH_LOG_PACKET,
|
||||
"Received close on channel (%d:%d)",
|
||||
channel->local_channel,
|
||||
channel->remote_channel);
|
||||
|
||||
if (!ssh_channel_has_unread_data(channel)) {
|
||||
channel->state = SSH_CHANNEL_STATE_CLOSED;
|
||||
} else {
|
||||
channel->delayed_close = 1;
|
||||
}
|
||||
if (!ssh_channel_has_unread_data(channel)) {
|
||||
channel->state = SSH_CHANNEL_STATE_CLOSED;
|
||||
} else {
|
||||
channel->delayed_close = 1;
|
||||
}
|
||||
|
||||
if (channel->remote_eof == 0) {
|
||||
SSH_LOG(SSH_LOG_PACKET,
|
||||
"Remote host not polite enough to send an eof before close");
|
||||
}
|
||||
channel->remote_eof = 1;
|
||||
/*
|
||||
* The remote eof doesn't break things if there was still data into read
|
||||
* buffer because the eof is ignored until the buffer is empty.
|
||||
*/
|
||||
if (channel->remote_eof == 0) {
|
||||
SSH_LOG(SSH_LOG_PACKET,
|
||||
"Remote host not polite enough to send an eof before close");
|
||||
}
|
||||
/*
|
||||
* The remote eof doesn't break things if there was still data into read
|
||||
* buffer because the eof is ignored until the buffer is empty.
|
||||
*/
|
||||
channel->remote_eof = 1;
|
||||
|
||||
ssh_callbacks_execute_list(channel->callbacks,
|
||||
ssh_channel_callbacks,
|
||||
@ -704,11 +704,11 @@ SSH_PACKET_CALLBACK(channel_rcv_close) {
|
||||
channel->session,
|
||||
channel);
|
||||
|
||||
channel->flags |= SSH_CHANNEL_FLAG_CLOSED_REMOTE;
|
||||
if(channel->flags & SSH_CHANNEL_FLAG_FREED_LOCAL)
|
||||
ssh_channel_do_free(channel);
|
||||
channel->flags |= SSH_CHANNEL_FLAG_CLOSED_REMOTE;
|
||||
if(channel->flags & SSH_CHANNEL_FLAG_FREED_LOCAL)
|
||||
ssh_channel_do_free(channel);
|
||||
|
||||
return SSH_PACKET_USED;
|
||||
return SSH_PACKET_USED;
|
||||
}
|
||||
|
||||
SSH_PACKET_CALLBACK(channel_rcv_request) {
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user