From 77603dbc5a5c55ecfa8d583c133db844673fb690 Mon Sep 17 00:00:00 2001 From: Aris Adamantiadis Date: Mon, 16 Jun 2008 23:02:49 +0000 Subject: 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 --- libssh/buffer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libssh/buffer.c') 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); -- cgit