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
9c788a52
Commit
9c788a52
authored
15 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
- Made the SO_SNDBUF setting for the data connection socket for ftp uploads as
well. See change 28 Apr 2009.
parent
6159c356
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CHANGES
+4
-0
4 additions, 0 deletions
CHANGES
lib/connect.c
+3
-5
3 additions, 5 deletions
lib/connect.c
lib/connect.h
+17
-1
17 additions, 1 deletion
lib/connect.h
lib/ftp.c
+3
-0
3 additions, 0 deletions
lib/ftp.c
with
27 additions
and
6 deletions
CHANGES
+
4
−
0
View file @
9c788a52
...
...
@@ -6,6 +6,10 @@
Changelog
Daniel Stenberg (7 May 2009)
- Made the SO_SNDBUF setting for the data connection socket for ftp uploads as
well. See change 28 Apr 2009.
Yang Tse (7 May 2009)
- Fixed an issue affecting FTP transfers, introduced with the transfer.c
patch committed May 4.
...
...
This diff is collapsed.
Click to expand it.
lib/connect.c
+
3
−
5
View file @
9c788a52
...
...
@@ -714,15 +714,13 @@ static void nosigpipe(struct connectdata *conn,
Buffer Size
*/
static
void
sndbufset
(
struct
connectdata
*
conn
,
curl_socket_t
sockfd
)
void
Curl_sndbufset
(
curl_socket_t
sockfd
)
{
int
val
=
CURL_MAX_WRITE_SIZE
+
32
;
(
void
)
conn
;
setsockopt
(
sockfd
,
SOL_SOCKET
,
SO_SNDBUF
,
(
const
char
*
)
&
val
,
sizeof
(
val
));
}
#else
#define sndbufset(
x,
y)
#define
Curl_
sndbufset(y)
#endif
...
...
@@ -829,7 +827,7 @@ singleipconnect(struct connectdata *conn,
nosigpipe
(
conn
,
sockfd
);
sndbufset
(
conn
,
sockfd
);
Curl_
sndbufset
(
sockfd
);
if
(
data
->
set
.
fsockopt
)
{
/* activate callback for setting socket options */
...
...
This diff is collapsed.
Click to expand it.
lib/connect.h
+
17
−
1
View file @
9c788a52
...
...
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 200
8
, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 200
9
, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
...
...
@@ -54,4 +54,20 @@ long Curl_timeleft(struct connectdata *conn,
CURLcode
Curl_getconnectinfo
(
struct
SessionHandle
*
data
,
long
*
param_longp
,
struct
connectdata
**
connp
);
#ifdef WIN32
/* When you run a program that uses the Windows Sockets API, you may
experience slow performance when you copy data to a TCP server.
http://support.microsoft.com/kb/823764
Work-around: Make the Socket Send Buffer Size Larger Than the Program Send
Buffer Size
*/
void
Curl_sndbufset
(
curl_socket_t
sockfd
);
#else
#define Curl_sndbufset(y)
#endif
#endif
This diff is collapsed.
Click to expand it.
lib/ftp.c
+
3
−
0
View file @
9c788a52
...
...
@@ -2308,6 +2308,9 @@ static CURLcode ftp_state_stor_resp(struct connectdata *conn,
Curl_pgrsSetUploadSize
(
data
,
data
->
set
.
infilesize
);
/* set the SO_SNDBUF for the secondary socket for those who need it */
Curl_sndbufset
(
conn
->
sock
[
SECONDARYSOCKET
]);
result
=
Curl_setup_transfer
(
conn
,
-
1
,
-
1
,
FALSE
,
NULL
,
/* no download */
SECONDARYSOCKET
,
ftp
->
bytecountp
);
state
(
conn
,
FTP_STOP
);
...
...
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