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
79948171
Commit
79948171
authored
23 years ago
by
Sterling Hughes
Browse files
Options
Downloads
Patches
Plain Diff
begin abstraction process...
parent
5ce97dbf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/ftp.c
+31
-20
31 additions, 20 deletions
lib/ftp.c
with
31 additions
and
20 deletions
lib/ftp.c
+
31
−
20
View file @
79948171
...
...
@@ -601,6 +601,34 @@ CURLcode Curl_ftp_done(struct connectdata *conn)
static
CURLCode
_ftp_sendquote
(
struct
connectdata
*
conn
,
struct
curl_slist
*
quote
)
{
struct
curl_slist
*
item
;
ssize_t
nread
;
int
ftpcode
;
item
=
quote
;
while
(
item
)
{
if
(
item
->
data
)
{
ftpsendf
(
conn
->
firstsocket
,
conn
,
"%"
,
item
->
data
);
nread
=
Curl_GetFTPResponse
(
conn
->
firstsocket
,
conn
->
data
->
buffer
,
conn
,
&
ftpcode
);
if
(
nread
<
0
)
return
CURLE_OPERATION_TIMEOUTED
;
if
(
ftpcode
>=
400
)
{
failf
(
conn
->
data
,
"QUOT string not accepted: %s"
,
item
->
data
);
return
CURLE_FTP_QUOTE_ERROR
;
}
}
tem
=
item
->
next
;
}
return
CURLE_OK
;
}
static
CURLcode
_ftp
(
struct
connectdata
*
conn
)
{
...
...
@@ -630,27 +658,10 @@ CURLcode _ftp(struct connectdata *conn)
/* Send any QUOTE strings? */
if
(
data
->
quote
)
{
qitem
=
data
->
quote
;
/* Send all QUOTE strings in same order as on command-line */
while
(
qitem
)
{
/* Send string */
if
(
qitem
->
data
)
{
ftpsendf
(
conn
->
firstsocket
,
conn
,
"%s"
,
qitem
->
data
);
nread
=
Curl_GetFTPResponse
(
conn
->
firstsocket
,
buf
,
conn
,
&
ftpcode
);
if
(
nread
<
0
)
return
CURLE_OPERATION_TIMEOUTED
;
if
(
ftpcode
>=
400
)
{
failf
(
data
,
"QUOT string not accepted: %s"
,
qitem
->
data
);
return
CURLE_FTP_QUOTE_ERROR
;
}
}
qitem
=
qitem
->
next
;
}
if
((
result
=
_ftp_sendquote
(
conn
,
data
->
quote
))
!=
CURLE_OK
)
return
result
;
}
if
(
conn
->
bits
.
reuse
)
{
/* This is a re-used connection. Since we change directory to where the
transfer is taking place, we must now get back to the original dir
...
...
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