Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
7ffe62d9
Commit
7ffe62d9
authored
16 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
- Given a recent enough libssh2, libcurl can now seek/resume with SFTP even
on file indexes beyond 2 or 4GB.
parent
d5bfec70
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGES
+2
-0
2 additions, 0 deletions
CHANGES
RELEASE-NOTES
+1
-0
1 addition, 0 deletions
RELEASE-NOTES
lib/ssh.c
+13
-3
13 additions, 3 deletions
lib/ssh.c
with
16 additions
and
3 deletions
CHANGES
+
2
−
0
View file @
7ffe62d9
...
...
@@ -7,6 +7,8 @@
Changelog
Daniel Stenberg (22 Dec 2008)
- Given a recent enough libssh2, libcurl can now seek/resume with SFTP even
on file indexes beyond 2 or 4GB.
- Anthony Bryan provided a set of patches that cleaned up manual language,
corrected spellings and more.
...
...
This diff is collapsed.
Click to expand it.
RELEASE-NOTES
+
1
−
0
View file @
7ffe62d9
...
...
@@ -37,6 +37,7 @@ This release includes the following bugfixes:
o curl_multi_timeout() no longer returns timeout 0 when there's nothing to do
yet
o the multi_socket API and HTTP pipelining now work a lot better when combined
o SFTP seek/resume beyond 32bit file sizes
This release includes the following known bugs:
...
...
This diff is collapsed.
Click to expand it.
lib/ssh.c
+
13
−
3
View file @
7ffe62d9
...
...
@@ -431,6 +431,16 @@ static CURLcode ssh_getworkingpath(struct connectdata *conn,
return
CURLE_OK
;
}
/*
* Earlier libssh2 versions didn't have the ability to seek to 64bit positions
* with 32bit size_t.
*/
#ifdef HAVE_LIBSSH2_SFTP_SEEK2
#define SFTP_SEEK(x,y) libssh2_sftp_seek2(x, (libssh2_uint64_t)y)
#else
#define SFTP_SEEK(x,y) libssh2_sftp_seek(x, y)
#endif
/*
* ssh_statemach_act() runs the SSH statemachine "one round" and returns. The
* data the pointer 'block' points to will be set to TRUE if the libssh2
...
...
@@ -1343,7 +1353,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
Curl_pgrsSetUploadSize
(
data
,
data
->
set
.
infilesize
);
}
libssh2_sftp_seek
(
sshc
->
sftp_handle
,
data
->
state
.
resume_from
);
SFTP_SEEK
(
sshc
->
sftp_handle
,
data
->
state
.
resume_from
);
}
if
(
data
->
set
.
infilesize
>
0
)
{
data
->
req
.
size
=
data
->
set
.
infilesize
;
...
...
@@ -1716,7 +1726,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
size
=
to
-
from
+
1
;
}
libssh2_sftp_seek
(
conn
->
proto
.
sshc
.
sftp_handle
,
from
);
SFTP_SEEK
(
conn
->
proto
.
sshc
.
sftp_handle
,
from
);
}
data
->
req
.
size
=
size
;
data
->
req
.
maxdownload
=
size
;
...
...
@@ -1750,7 +1760,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
data
->
req
.
maxdownload
=
attrs
.
filesize
-
data
->
state
.
resume_from
;
Curl_pgrsSetDownloadSize
(
data
,
attrs
.
filesize
-
data
->
state
.
resume_from
);
libssh2_sftp_seek
(
sshc
->
sftp_handle
,
data
->
state
.
resume_from
);
SFTP_SEEK
(
sshc
->
sftp_handle
,
data
->
state
.
resume_from
);
}
}
/* Setup the actual download */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment