diff options
Diffstat (limited to 'sample.c')
-rw-r--r-- | sample.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -283,10 +283,12 @@ void do_sftp(SSH_SESSION *session){ SFTP_FILE *fichier; SFTP_FILE *to; int len=1; - int i; + unsigned int i; char data[8000]={0}; char *link; + unsigned int count; + if(!sftp_session){ fprintf(stderr, "sftp error initialising channel: %s\n", ssh_get_error(session)); @@ -298,6 +300,14 @@ void do_sftp(SSH_SESSION *session){ return; } + printf("Additional SFTP extensions provided by the server:\n"); + count = sftp_extensions_get_count(sftp_session); + for (i = 0; i < count; i++) { + printf("\t%s, version: %s\n", + sftp_extensions_get_name(sftp_session, i), + sftp_extensions_get_data(sftp_session, i)); + } + /* test symlink and readlink */ if (sftp_symlink(sftp_session, "/tmp/this_is_the_link", "/tmp/sftp_symlink_test") < 0) { |