1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-07-28 01:41:49 +03:00

examples: use stderr for messages, stdout for data

Reported by: Karel Srot
Bug: https://bugzilla.redhat.com/867462
This commit is contained in:
Kamil Dudka
2012-10-22 13:29:27 +02:00
parent e2bb780d77
commit b31e35aba6
20 changed files with 148 additions and 141 deletions

View File

@ -251,7 +251,7 @@ int main(int argc, char *argv[])
gettimeofday(&end, NULL);
time_ms = tvdiff(end, start);
printf("Got %d bytes in %ld ms = %.1f bytes/sec spin: %d\n", total,
fprintf(stderr, "Got %d bytes in %ld ms = %.1f bytes/sec spin: %d\n", total,
time_ms, total/(time_ms/1000.0), spin );
libssh2_sftp_close(sftp_handle);
@ -259,7 +259,7 @@ int main(int argc, char *argv[])
shutdown:
printf("libssh2_session_disconnect\n");
fprintf(stderr, "libssh2_session_disconnect\n");
while (libssh2_session_disconnect(session,
"Normal Shutdown, Thank you") ==
LIBSSH2_ERROR_EAGAIN);