aboutsummaryrefslogtreecommitdiff
path: root/libssh/channels1.c
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2008-06-16 23:02:49 +0000
committerAris Adamantiadis <aris@0xbadc0de.be>2008-06-16 23:02:49 +0000
commit77603dbc5a5c55ecfa8d583c133db844673fb690 (patch)
tree96c4ad653c74e1d53791f4a73c49d43cdcb58359 /libssh/channels1.c
parent5367581ce1d52518343bb8ede60738f4035e033a (diff)
downloadlibssh-77603dbc5a5c55ecfa8d583c133db844673fb690.tar.gz
libssh-77603dbc5a5c55ecfa8d583c133db844673fb690.tar.xz
libssh-77603dbc5a5c55ecfa8d583c133db844673fb690.zip
Big changes :
refactoring of the socket class. Now the buffering happens in the socket class. enhanced the logging system. Cleaned up some debugging messages. Verified the working with ssh-1. If this cleanup introduced bugs (it did but corrected the found ones) at least, they will be easier to find also added the (c) and fixed dates for updated files git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@169 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'libssh/channels1.c')
-rw-r--r--libssh/channels1.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/libssh/channels1.c b/libssh/channels1.c
index c8ab3e24..d90d2398 100644
--- a/libssh/channels1.c
+++ b/libssh/channels1.c
@@ -67,7 +67,6 @@ int channel_request_pty_size1(CHANNEL *channel, char *terminal, int col,
STRING *str;
SSH_SESSION *session=channel->session;
str=string_from_char(terminal);
- packet_clear_out(session);
buffer_add_u8(session->out_buffer,SSH_CMSG_REQUEST_PTY);
buffer_add_ssh_string(session->out_buffer,str);
free(str);
@@ -105,7 +104,6 @@ int channel_request_pty_size1(CHANNEL *channel, char *terminal, int col,
int channel_change_pty_size1(CHANNEL *channel, int cols, int rows){
SSH_SESSION *session=channel->session;
- packet_clear_out(session);
buffer_add_u8(session->out_buffer,SSH_CMSG_WINDOW_SIZE);
buffer_add_u32(session->out_buffer,ntohl(rows));
buffer_add_u32(session->out_buffer,ntohl(cols));
@@ -132,7 +130,6 @@ int channel_change_pty_size1(CHANNEL *channel, int cols, int rows){
int channel_request_shell1(CHANNEL *channel){
SSH_SESSION *session=channel->session;
- packet_clear_out(session);
buffer_add_u8(session->out_buffer,SSH_CMSG_EXEC_SHELL);
if(packet_send(session))
return -1;
@@ -143,7 +140,6 @@ int channel_request_shell1(CHANNEL *channel){
int channel_request_exec1(CHANNEL *channel, char *cmd){
SSH_SESSION *session=channel->session;
STRING *command=string_from_char(cmd);
- packet_clear_out(session);
buffer_add_u8(session->out_buffer,SSH_CMSG_EXEC_CMD);
buffer_add_ssh_string(session->out_buffer,command);
free(command);
@@ -179,7 +175,6 @@ static void channel_rcv_close1(SSH_SESSION *session){
/* actually status is lost somewhere */
channel->open=0;
channel->remote_eof=1;
- packet_clear_out(session);
buffer_add_u8(session->out_buffer,SSH_CMSG_EXIT_CONFIRMATION);
packet_send(session);
}
@@ -204,7 +199,6 @@ int channel_write1(CHANNEL *channel, void *data, int len){
int origlen=len;
int effectivelen;
while(len>0){
- packet_clear_out(session);
buffer_add_u8(session->out_buffer,SSH_CMSG_STDIN_DATA);
if(len > 32000)
effectivelen=32000;