mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-11 18:50:28 +09:00
Fix infinite loop in exec example
This commit is contained in:
@@ -36,7 +36,7 @@ int main(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
while ((rc = channel_read(channel, buffer, sizeof(buffer), 0)) >= 0) {
|
while ((rc = channel_read(channel, buffer, sizeof(buffer), 0)) > 0) {
|
||||||
fwrite(buffer, 1, rc, stdout);
|
fwrite(buffer, 1, rc, stdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user