aboutsummaryrefslogtreecommitdiff
path: root/libssh/sftp.c
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2009-05-04 10:06:49 +0000
committerAndreas Schneider <mail@cynapses.org>2009-05-04 10:06:49 +0000
commit152da0702351dce04b62999aa98efc57fbda4489 (patch)
tree99a98d1ee0b4e29d9c6616c9cbe0496ae837487a /libssh/sftp.c
parentdda7808851079f75042fd73850adb336eb53c8e8 (diff)
downloadlibssh-152da0702351dce04b62999aa98efc57fbda4489.tar.gz
libssh-152da0702351dce04b62999aa98efc57fbda4489.tar.xz
libssh-152da0702351dce04b62999aa98efc57fbda4489.zip
Implement channel_read() as a POSIX like function.
Create channel_read_buffer() to have the old version still available. git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@700 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'libssh/sftp.c')
-rw-r--r--libssh/sftp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libssh/sftp.c b/libssh/sftp.c
index 55dd93fc..24666c8a 100644
--- a/libssh/sftp.c
+++ b/libssh/sftp.c
@@ -237,7 +237,7 @@ SFTP_PACKET *sftp_packet_read(SFTP_SESSION *sftp) {
return NULL;
}
- if (channel_read(sftp->channel, packet->payload, 4, 0) <= 0) {
+ if (channel_read_buffer(sftp->channel, packet->payload, 4, 0) <= 0) {
buffer_free(packet->payload);
SAFE_FREE(packet);
sftp_leave_function();
@@ -252,7 +252,7 @@ SFTP_PACKET *sftp_packet_read(SFTP_SESSION *sftp) {
}
size = ntohl(size);
- if (channel_read(sftp->channel, packet->payload, 1, 0) <= 0) {
+ if (channel_read_buffer(sftp->channel, packet->payload, 1, 0) <= 0) {
buffer_free(packet->payload);
SAFE_FREE(packet);
sftp_leave_function();
@@ -261,7 +261,7 @@ SFTP_PACKET *sftp_packet_read(SFTP_SESSION *sftp) {
buffer_get_u8(packet->payload, &packet->type);
if (size > 1) {
- if (channel_read(sftp->channel, packet->payload, size - 1, 0) <= 0) {
+ if (channel_read_buffer(sftp->channel, packet->payload, size - 1, 0) <= 0) {
buffer_free(packet->payload);
SAFE_FREE(packet);
sftp_leave_function();