summaryrefslogtreecommitdiffstats
path: root/libssh/buffer.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/buffer.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/buffer.c')
-rw-r--r--libssh/buffer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libssh/buffer.c b/libssh/buffer.c
index 88cca40..3dea65d 100644
--- a/libssh/buffer.c
+++ b/libssh/buffer.c
@@ -1,5 +1,5 @@
/*
-Copyright 2003-2008 Aris Adamantiadis
+Copyright (c) 2003-2008 Aris Adamantiadis
This file is part of the SSH Library
@@ -75,7 +75,7 @@ static void realloc_buffer(BUFFER *buffer,int needed){
* \param data data pointer
* \param len length of data
*/
-void buffer_add_data(BUFFER *buffer,void *data,int len){
+void buffer_add_data(BUFFER *buffer,const void *data,int len){
if(buffer->allocated < buffer->used+len)
realloc_buffer(buffer,buffer->used+len);
memcpy(buffer->data+buffer->used,data,len);
@@ -105,7 +105,7 @@ void buffer_add_u8(BUFFER *buffer,u8 data){
* \param data data to add
* \param len length of data
*/
-void buffer_add_data_begin(BUFFER *buffer, void *data, int len){
+void buffer_add_data_begin(BUFFER *buffer, const void *data, int len){
if(buffer->allocated < buffer->used + len)
realloc_buffer(buffer,buffer->used+len);
memmove(buffer->data+len,buffer->data,buffer->used);