From 5a3da233ec5277868426af91df1d2beb7710e085 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 31 Mar 2009 12:20:36 +0000 Subject: [PATCH] Sofian Brabez removed duplicate calls to libssh2_session_set_blocking() --- example/simple/sftp.c | 8 +------- example/simple/sftp_write.c | 5 +---- example/simple/sftp_write_nonblock.c | 5 +---- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/example/simple/sftp.c b/example/simple/sftp.c index 156ad3a..9b44378 100644 --- a/example/simple/sftp.c +++ b/example/simple/sftp.c @@ -1,5 +1,5 @@ /* - * $Id: sftp.c,v 1.15 2008/11/10 16:48:41 bagder Exp $ + * $Id: sftp.c,v 1.16 2009/03/31 12:20:36 bagder Exp $ * * Sample showing how to do SFTP transfers. * @@ -131,9 +131,6 @@ int main(int argc, char *argv[]) return -1; } - /* Since we have not set non-blocking, tell libssh2 we are blocking */ - libssh2_session_set_blocking(session, 1); - /* At this point we havn't yet authenticated. The first thing to do * is check the hostkey's fingerprint against our known hosts Your app * may have it hard coded, may go to a file, may present it to the @@ -207,9 +204,6 @@ int main(int argc, char *argv[]) goto shutdown; } - /* Since we have not set non-blocking, tell libssh2 we are blocking */ - libssh2_session_set_blocking(session, 1); - fprintf(stderr, "libssh2_sftp_open()!\n"); /* Request a file via SFTP */ sftp_handle = diff --git a/example/simple/sftp_write.c b/example/simple/sftp_write.c index 2fe5889..f168395 100644 --- a/example/simple/sftp_write.c +++ b/example/simple/sftp_write.c @@ -1,5 +1,5 @@ /* - * $Id: sftp_write.c,v 1.9 2008/11/10 16:48:41 bagder Exp $ + * $Id: sftp_write.c,v 1.10 2009/03/31 12:20:36 bagder Exp $ * * Sample showing how to do SFTP write transfers. * @@ -155,9 +155,6 @@ int main(int argc, char *argv[]) goto shutdown; } - /* Since we have not set non-blocking, tell libssh2 we are blocking */ - libssh2_session_set_blocking(session, 1); - fprintf(stderr, "libssh2_sftp_open()!\n"); /* Request a file via SFTP */ sftp_handle = diff --git a/example/simple/sftp_write_nonblock.c b/example/simple/sftp_write_nonblock.c index 7e56250..65b11c7 100644 --- a/example/simple/sftp_write_nonblock.c +++ b/example/simple/sftp_write_nonblock.c @@ -1,5 +1,5 @@ /* - * $Id: sftp_write_nonblock.c,v 1.12 2008/11/10 16:48:41 bagder Exp $ + * $Id: sftp_write_nonblock.c,v 1.13 2009/03/31 12:20:36 bagder Exp $ * * Sample showing how to do SFTP non-blocking write transfers. * @@ -180,9 +180,6 @@ int main(int argc, char *argv[]) } } while (!sftp_session); - /* Since we have set non-blocking, tell libssh2 we are non-blocking */ - libssh2_session_set_blocking(session, 0); - fprintf(stderr, "libssh2_sftp_open()!\n"); /* Request a file via SFTP */ do {