mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-12 03:00:26 +09:00
channel: Reformat ssh_channel_close()
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit 0ba10870d1)
This commit is contained in:
@@ -1128,7 +1128,8 @@ error:
|
|||||||
* @see ssh_channel_free()
|
* @see ssh_channel_free()
|
||||||
* @see ssh_channel_is_eof()
|
* @see ssh_channel_is_eof()
|
||||||
*/
|
*/
|
||||||
int ssh_channel_close(ssh_channel channel){
|
int ssh_channel_close(ssh_channel channel)
|
||||||
|
{
|
||||||
ssh_session session;
|
ssh_session session;
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
@@ -1161,13 +1162,14 @@ int ssh_channel_close(ssh_channel channel){
|
|||||||
channel->local_channel,
|
channel->local_channel,
|
||||||
channel->remote_channel);
|
channel->remote_channel);
|
||||||
|
|
||||||
if(rc == SSH_OK) {
|
if (rc == SSH_OK) {
|
||||||
channel->state=SSH_CHANNEL_STATE_CLOSED;
|
channel->state = SSH_CHANNEL_STATE_CLOSED;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = ssh_channel_flush(channel);
|
rc = ssh_channel_flush(channel);
|
||||||
if(rc == SSH_ERROR)
|
if(rc == SSH_ERROR) {
|
||||||
goto error;
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
error:
|
error:
|
||||||
|
|||||||
Reference in New Issue
Block a user