diff options
author | Tom Deseyn <tom.deseyn@gmail.com> | 2021-01-08 13:23:00 +0100 |
---|---|---|
committer | Anderson Toshiyuki Sasaki <ansasaki@redhat.com> | 2021-01-11 20:46:02 +0100 |
commit | a4b8045fb85e8e674ff86f92d87c3418210a3c4c (patch) | |
tree | c4c6c9fb4c3739e3706f9fa1798fb0a9636479f9 /src | |
parent | 44dfee778fb042d0d13a64c4d42ea0cb285ca2ae (diff) | |
download | libssh-a4b8045fb85e8e674ff86f92d87c3418210a3c4c.tar.gz libssh-a4b8045fb85e8e674ff86f92d87c3418210a3c4c.tar.xz libssh-a4b8045fb85e8e674ff86f92d87c3418210a3c4c.zip |
channel_rcv_close: indentation
Signed-off-by: Tom Deseyn <tom.deseyn@gmail.com>
Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/channels.c | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/src/channels.c b/src/channels.c index 262ff64a..11a9413a 100644 --- a/src/channels.c +++ b/src/channels.c @@ -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) { |