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 3cf2b41f5e)
This commit is contained in:
Jakub Jelen
2019-09-17 15:08:29 +02:00
committed by Anderson Toshiyuki Sasaki
parent fcacc7fe8c
commit 6dcb960501

View File

@@ -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;
}