cleanup: use ssh_ prefix in the buffer (non-static) functions

Having "ssh_" prefix in the functions' name will avoid possible clashes
when compiling libssh statically.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Fabiano Fidêncio
2015-09-17 09:43:33 +02:00
parent 63e52afd5b
commit adc8c20ac1
30 changed files with 494 additions and 494 deletions

View File

@@ -58,8 +58,8 @@ static z_stream *initcompress(ssh_session session, int level) {
static ssh_buffer gzip_compress(ssh_session session,ssh_buffer source,int level){
z_stream *zout = session->current_crypto->compress_out_ctx;
void *in_ptr = buffer_get_rest(source);
unsigned long in_size = buffer_get_rest_len(source);
void *in_ptr = ssh_buffer_get_rest(source);
unsigned long in_size = ssh_buffer_get_rest_len(source);
ssh_buffer dest = NULL;
unsigned char out_buf[BLOCKSIZE] = {0};
unsigned long len;
@@ -113,7 +113,7 @@ int compress_buffer(ssh_session session, ssh_buffer buf) {
return -1;
}
if (ssh_buffer_add_data(buf, buffer_get_rest(dest), buffer_get_rest_len(dest)) < 0) {
if (ssh_buffer_add_data(buf, ssh_buffer_get_rest(dest), ssh_buffer_get_rest_len(dest)) < 0) {
ssh_buffer_free(dest);
return -1;
}
@@ -147,8 +147,8 @@ static z_stream *initdecompress(ssh_session session) {
static ssh_buffer gzip_decompress(ssh_session session, ssh_buffer source, size_t maxlen) {
z_stream *zin = session->current_crypto->compress_in_ctx;
void *in_ptr = buffer_get_rest(source);
unsigned long in_size = buffer_get_rest_len(source);
void *in_ptr = ssh_buffer_get_rest(source);
unsigned long in_size = ssh_buffer_get_rest_len(source);
unsigned char out_buf[BLOCKSIZE] = {0};
ssh_buffer dest = NULL;
unsigned long len;
@@ -185,7 +185,7 @@ static ssh_buffer gzip_decompress(ssh_session session, ssh_buffer source, size_t
ssh_buffer_free(dest);
return NULL;
}
if (buffer_get_rest_len(dest) > maxlen){
if (ssh_buffer_get_rest_len(dest) > maxlen){
/* Size of packet exceeded, avoid a denial of service attack */
ssh_buffer_free(dest);
return NULL;
@@ -209,7 +209,7 @@ int decompress_buffer(ssh_session session,ssh_buffer buf, size_t maxlen){
return -1;
}
if (ssh_buffer_add_data(buf, buffer_get_rest(dest), buffer_get_rest_len(dest)) < 0) {
if (ssh_buffer_add_data(buf, ssh_buffer_get_rest(dest), ssh_buffer_get_rest_len(dest)) < 0) {
ssh_buffer_free(dest);
return -1;
}