Sofian Brabez removed duplicate calls to libssh2_session_set_blocking()
This commit is contained in:
parent
74f4b7817b
commit
5a3da233ec
@ -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.
|
* Sample showing how to do SFTP transfers.
|
||||||
*
|
*
|
||||||
@ -131,9 +131,6 @@ int main(int argc, char *argv[])
|
|||||||
return -1;
|
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
|
/* 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
|
* 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
|
* 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;
|
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");
|
fprintf(stderr, "libssh2_sftp_open()!\n");
|
||||||
/* Request a file via SFTP */
|
/* Request a file via SFTP */
|
||||||
sftp_handle =
|
sftp_handle =
|
||||||
|
@ -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.
|
* Sample showing how to do SFTP write transfers.
|
||||||
*
|
*
|
||||||
@ -155,9 +155,6 @@ int main(int argc, char *argv[])
|
|||||||
goto shutdown;
|
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");
|
fprintf(stderr, "libssh2_sftp_open()!\n");
|
||||||
/* Request a file via SFTP */
|
/* Request a file via SFTP */
|
||||||
sftp_handle =
|
sftp_handle =
|
||||||
|
@ -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.
|
* Sample showing how to do SFTP non-blocking write transfers.
|
||||||
*
|
*
|
||||||
@ -180,9 +180,6 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
} while (!sftp_session);
|
} 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");
|
fprintf(stderr, "libssh2_sftp_open()!\n");
|
||||||
/* Request a file via SFTP */
|
/* Request a file via SFTP */
|
||||||
do {
|
do {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user