diff options
author | Jakub Jelen <jjelen@redhat.com> | 2019-09-17 15:08:29 +0200 |
---|---|---|
committer | Anderson Toshiyuki Sasaki <ansasaki@redhat.com> | 2019-09-30 15:59:27 +0200 |
commit | 6dcb96050170229992468c62f8986f676f2b4159 (patch) | |
tree | f41a5d9447527858f00712a0d4d2884e28adb13e | |
parent | fcacc7fe8ce07f11b7c63683df3d1fb495fbaaa0 (diff) | |
download | libssh-6dcb96050170229992468c62f8986f676f2b4159.tar.gz libssh-6dcb96050170229992468c62f8986f676f2b4159.tar.xz libssh-6dcb96050170229992468c62f8986f676f2b4159.zip |
channels: Do not use deprecated functions in the example code
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
(cherry picked from commit 3cf2b41f5eafacc92ac8a04d887ca448af88fab2)
-rw-r--r-- | src/channels.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/channels.c b/src/channels.c index 71d39c62..15f232e1 100644 --- a/src/channels.c +++ b/src/channels.c @@ -2513,12 +2513,12 @@ error: * * Example: @code - rc = channel_request_exec(channel, "ps aux"); + rc = ssh_channel_request_exec(channel, "ps aux"); if (rc > 0) { return -1; } - while ((rc = channel_read(channel, buffer, sizeof(buffer), 0)) > 0) { + while ((rc = ssh_channel_read(channel, buffer, sizeof(buffer), 0)) > 0) { if (fwrite(buffer, 1, rc, stdout) != (unsigned int) rc) { return -1; } |