aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2009-09-06 19:35:40 +0300
committerAris Adamantiadis <aris@0xbadc0de.be>2009-09-13 14:03:34 +0300
commit929f5ca25b56ce46bf49e9a44d40bab3ef2d6076 (patch)
tree4641c368f4b655e01c4fd9ee1262f9340419a2a0 /examples
parent7ff80a2666fcdd0ee8dc897ce5ea665a4faed681 (diff)
downloadlibssh-929f5ca25b56ce46bf49e9a44d40bab3ef2d6076.tar.gz
libssh-929f5ca25b56ce46bf49e9a44d40bab3ef2d6076.tar.xz
libssh-929f5ca25b56ce46bf49e9a44d40bab3ef2d6076.zip
scp recursive mode
Diffstat (limited to 'examples')
-rw-r--r--examples/scp_download.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/scp_download.c b/examples/scp_download.c
index f719515c..9da3aafd 100644
--- a/examples/scp_download.c
+++ b/examples/scp_download.c
@@ -85,7 +85,7 @@ static int fetch_files(ssh_session session){
int mode;
char *filename;
int r;
- ssh_scp scp=ssh_scp_new(session, SSH_SCP_READ, "/tmp/libssh_tests/*");
+ ssh_scp scp=ssh_scp_new(session, SSH_SCP_READ | SSH_SCP_RECURSIVE, "/tmp/libssh_tests/*");
if(ssh_scp_init(scp) != SSH_OK){
fprintf(stderr,"error initializing scp: %s\n",ssh_get_error(session));
return -1;
@@ -121,6 +121,9 @@ static int fetch_files(ssh_session session){
free(filename);
ssh_scp_accept_request(scp);
break;
+ case SSH_SCP_REQUEST_ENDDIR:
+ printf("End of directory\n");
+ break;
case SSH_SCP_REQUEST_EOF:
printf("End of requests\n");
goto end;