summaryrefslogtreecommitdiffstats
path: root/libssh
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2009-05-03 17:51:09 +0000
committerAndreas Schneider <mail@cynapses.org>2009-05-03 17:51:09 +0000
commit2b705786c0a4be4429521ab53dc14fe82959cbc4 (patch)
tree6d8efd6a185c680b3f7a1026a7f6a616cbcce0c1 /libssh
parente46d2d024cbc1fd1aa39fbb7eb9babda2b654629 (diff)
downloadlibssh-2b705786c0a4be4429521ab53dc14fe82959cbc4.tar.gz
libssh-2b705786c0a4be4429521ab53dc14fe82959cbc4.tar.xz
libssh-2b705786c0a4be4429521ab53dc14fe82959cbc4.zip
Reformat channel_rcv_eof().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@679 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'libssh')
-rw-r--r--libssh/channels.c34
1 files changed, 19 insertions, 15 deletions
diff --git a/libssh/channels.c b/libssh/channels.c
index 1462cb5..a169d53 100644
--- a/libssh/channels.c
+++ b/libssh/channels.c
@@ -403,22 +403,26 @@ static void channel_rcv_data(SSH_SESSION *session,int is_stderr) {
leave_function();
}
-static void channel_rcv_eof(SSH_SESSION *session){
- CHANNEL *channel;
- enter_function();
- channel=channel_from_msg(session);
- if(!channel){
- ssh_log(session, SSH_LOG_FUNCTIONS, "%s", ssh_get_error(session));
- leave_function();
- return;
- }
- ssh_log(session, SSH_LOG_PACKET,
- "Received eof on channel (%d:%d)",
- channel->local_channel,
- channel->remote_channel);
-// channel->remote_window=0;
- channel->remote_eof=1;
+static void channel_rcv_eof(SSH_SESSION *session) {
+ CHANNEL *channel;
+
+ enter_function();
+
+ channel = channel_from_msg(session);
+ if (channel == NULL) {
+ ssh_log(session, SSH_LOG_FUNCTIONS, ssh_get_error(session));
leave_function();
+ return;
+ }
+
+ ssh_log(session, SSH_LOG_PACKET,
+ "Received eof on channel (%d:%d)",
+ channel->local_channel,
+ channel->remote_channel);
+ /* channel->remote_window = 0; */
+ channel->remote_eof = 1;
+
+ leave_function();
}
static void channel_rcv_close(SSH_SESSION *session){