diff options
author | Andreas Schneider <mail@cynapses.org> | 2009-05-03 18:20:03 +0000 |
---|---|---|
committer | Andreas Schneider <mail@cynapses.org> | 2009-05-03 18:20:03 +0000 |
commit | e97275c7bc3afa0143fbddf22d4102d50c9bb233 (patch) | |
tree | 69124da9e7e1c43e1a38e726ecc8e9e44debb16a /libssh | |
parent | 783825254a8e645c9c7e10c500771063b71863ef (diff) | |
download | libssh-e97275c7bc3afa0143fbddf22d4102d50c9bb233.tar.gz libssh-e97275c7bc3afa0143fbddf22d4102d50c9bb233.tar.xz libssh-e97275c7bc3afa0143fbddf22d4102d50c9bb233.zip |
Reformat channel_handle().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@682 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'libssh')
-rw-r--r-- | libssh/channels.c | 60 |
1 files changed, 33 insertions, 27 deletions
diff --git a/libssh/channels.c b/libssh/channels.c index 7854add..22d1949 100644 --- a/libssh/channels.c +++ b/libssh/channels.c @@ -545,34 +545,40 @@ static void channel_rcv_request(SSH_SESSION *session) { leave_function(); } -/* channel_handle is called by wait_packet, ie, when there is channel informations to handle . */ +/* + * channel_handle() is called by packet_wait(), for example when there is + * channel informations to handle. + */ void channel_handle(SSH_SESSION *session, int type){ - enter_function(); - ssh_log(session, SSH_LOG_PROTOCOL, "Channel_handle(%d)", type); - switch(type){ - case SSH2_MSG_CHANNEL_WINDOW_ADJUST: - channel_rcv_change_window(session); - break; - case SSH2_MSG_CHANNEL_DATA: - channel_rcv_data(session,0); - break; - case SSH2_MSG_CHANNEL_EXTENDED_DATA: - channel_rcv_data(session,1); - break; - case SSH2_MSG_CHANNEL_EOF: - channel_rcv_eof(session); - break; - case SSH2_MSG_CHANNEL_CLOSE: - channel_rcv_close(session); - break; - case SSH2_MSG_CHANNEL_REQUEST: - channel_rcv_request(session); - break; - default: - ssh_log(session, SSH_LOG_FUNCTIONS, - "Unexpected message %d", type); - } - leave_function(); + enter_function(); + + ssh_log(session, SSH_LOG_PROTOCOL, "Channel_handle(%d)", type); + + switch(type) { + case SSH2_MSG_CHANNEL_WINDOW_ADJUST: + channel_rcv_change_window(session); + break; + case SSH2_MSG_CHANNEL_DATA: + channel_rcv_data(session,0); + break; + case SSH2_MSG_CHANNEL_EXTENDED_DATA: + channel_rcv_data(session,1); + break; + case SSH2_MSG_CHANNEL_EOF: + channel_rcv_eof(session); + break; + case SSH2_MSG_CHANNEL_CLOSE: + channel_rcv_close(session); + break; + case SSH2_MSG_CHANNEL_REQUEST: + channel_rcv_request(session); + break; + default: + ssh_log(session, SSH_LOG_FUNCTIONS, + "Unexpected message %d", type); + } + + leave_function(); } /* when data has been received from the ssh server, it can be applied to the known |