diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2005-11-30 21:23:12 +0000 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2005-11-30 21:23:12 +0000 |
commit | 3edfd105b37c71f10816f32022e6baf54625d9c0 (patch) | |
tree | 7d0cad7e6271b2ce268b036d9508705f9870d3a2 /sample.c | |
parent | ac4fd091775805b6849774f3c4b7e59dc1ab6bde (diff) | |
download | libssh-3edfd105b37c71f10816f32022e6baf54625d9c0.tar.gz libssh-3edfd105b37c71f10816f32022e6baf54625d9c0.tar.xz libssh-3edfd105b37c71f10816f32022e6baf54625d9c0.zip |
nonblocking support in dh_handshake() from client.c
some packet nonblocking fixes.
reenable sftp from the sample client.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@52 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'sample.c')
-rw-r--r-- | sample.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -319,7 +319,7 @@ void do_sftp(SSH_SESSION *session){ ssh_say(0,"Error reading file : %s\n",ssh_get_error(session)); sftp_file_close(fichier); sftp_file_close(to); - printf("fichiers fermés\n"); + printf("fichiers ferm�\n"); to=sftp_open(sftp,"/tmp/grosfichier",O_WRONLY|O_CREAT,NULL); for(i=0;i<1000;++i){ len=sftp_write(to,data,8000); @@ -331,7 +331,7 @@ void do_sftp(SSH_SESSION *session){ sftp_file_close(to); /* close the sftp session */ sftp_free(sftp); - printf("session sftp terminée\n"); + printf("session sftp termin�\n"); } int auth_kbdint(SSH_SESSION *session){ @@ -463,6 +463,11 @@ int main(int argc, char **argv){ memset(password,0,strlen(password)); } ssh_say(1,"Authentication success\n"); + printf("%s\n",argv[0]); + if(strstr(argv[0],"sftp")){ + sftp=1; + ssh_say(1,"doing sftp instead\n"); + } if(!sftp){ if(!cmds[0]) shell(session); |