diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-09-23 23:51:04 +0200 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-09-23 23:51:04 +0200 |
commit | f84ebc2e2770b16b43c62ecb67cf8d4bd1b99d72 (patch) | |
tree | 82abdf7a1e84c9a281f622e38247e67563d68ffa /libssh/buffer.c | |
parent | b359229a2ea6f8b623add9bea02015991c8d6e9d (diff) | |
download | libssh-f84ebc2e2770b16b43c62ecb67cf8d4bd1b99d72.tar.gz libssh-f84ebc2e2770b16b43c62ecb67cf8d4bd1b99d72.tar.xz libssh-f84ebc2e2770b16b43c62ecb67cf8d4bd1b99d72.zip |
Moved lots of declaration out of priv.h
Diffstat (limited to 'libssh/buffer.c')
-rw-r--r-- | libssh/buffer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libssh/buffer.c b/libssh/buffer.c index 2f450b5..a24dc68 100644 --- a/libssh/buffer.c +++ b/libssh/buffer.c @@ -29,7 +29,7 @@ #endif #include "libssh/priv.h" - +#include "libssh/buffer.h" /** \defgroup ssh_buffer SSH Buffers * \brief buffer handling */ @@ -167,7 +167,7 @@ int buffer_add_ssh_string(struct ssh_buffer_struct *buffer, struct ssh_string_struct *string) { uint32_t len = 0; - len = ntohl(string->size); + len = string_len(string); if (buffer_add_data(buffer, string, len + sizeof(uint32_t)) < 0) { return -1; } @@ -404,7 +404,7 @@ struct ssh_string_struct *buffer_get_ssh_string(struct ssh_buffer_struct *buffer if (str == NULL) { return NULL; } - if (buffer_get_data(buffer, str->string, hostlen) != hostlen) { + if (buffer_get_data(buffer, string_data(str), hostlen) != hostlen) { /* should never happen */ SAFE_FREE(str); return NULL; @@ -437,7 +437,7 @@ struct ssh_string_struct *buffer_get_mpint(struct ssh_buffer_struct *buffer) { if (str == NULL) { return NULL; } - if (buffer_get_data(buffer, str->string, len) != len) { + if (buffer_get_data(buffer, string_data(str), len) != len) { SAFE_FREE(str); return NULL; } |