summaryrefslogtreecommitdiffstats
path: root/include/libssh/libsshpp.hpp
diff options
context:
space:
mode:
authorPetar Koretic <petar.koretic@sartura.hr>2014-03-20 09:59:42 +0000
committerAndreas Schneider <asn@cryptomilk.org>2014-03-27 11:15:39 +0100
commitc0cc12d58246e20e5af2cf561678164fbabfb910 (patch)
tree0edb8d345049852e837fa1d3855d43a010ca8089 /include/libssh/libsshpp.hpp
parenta162071f9a10413577341bbba601cfff66113b46 (diff)
libssh: libhpp: avoid unnecessary call to ssh_channel_read
ssh_channel_read is a wrapper for ssh_channel_read_timeout with timeout -1 (infinite) so we call that directly. Signed-off-by: Petar Koretic <petar.koretic@sartura.hr> Reviewed-by: Andreas Schneider <asn@cryptomilk.org> (cherry picked from commit c51f42a566879f61c2349066bc4e8dd35bc5c311)
Diffstat (limited to 'include/libssh/libsshpp.hpp')
-rw-r--r--include/libssh/libsshpp.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/libssh/libsshpp.hpp b/include/libssh/libsshpp.hpp
index 0dfbec20..f6cea649 100644
--- a/include/libssh/libsshpp.hpp
+++ b/include/libssh/libsshpp.hpp
@@ -485,7 +485,7 @@ public:
/* handle int overflow */
if(count > 0x7fffffff)
count = 0x7fffffff;
- err=ssh_channel_read(channel,dest,count,is_stderr);
+ err=ssh_channel_read_timeout(channel,dest,count,is_stderr,-1);
ssh_throw(err);
return err;
}