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
55e61c09
Commit
55e61c09
authored
20 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
Fixed multiple IP connects with the multi interface. This fix is influenced
by Gisle Vanem's patch, only modified by me.
parent
de6ab3de
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/connect.c
+5
-4
5 additions, 4 deletions
lib/connect.c
with
5 additions
and
4 deletions
lib/connect.c
+
5
−
4
View file @
55e61c09
...
...
@@ -432,7 +432,6 @@ static bool verifyconnect(curl_socket_t sockfd, int *error)
more address exists */
static
bool
trynextip
(
struct
connectdata
*
conn
,
int
sockindex
,
long
timeout
,
bool
*
connected
)
{
curl_socket_t
sockfd
;
...
...
@@ -441,13 +440,15 @@ static bool trynextip(struct connectdata *conn,
if
(
sockindex
!=
FIRSTSOCKET
)
return
TRUE
;
/* no next */
/* try the next address */
ai
=
conn
->
ip_addr
->
ai_next
;
while
(
ai
)
{
sockfd
=
singleipconnect
(
conn
,
ai
,
timeout
,
connected
);
sockfd
=
singleipconnect
(
conn
,
ai
,
0L
,
connected
);
if
(
sockfd
!=
CURL_SOCKET_BAD
)
{
/* store the new socket descriptor */
conn
->
sock
[
sockindex
]
=
sockfd
;
conn
->
ip_addr
=
ai
;
return
FALSE
;
}
ai
=
ai
->
ai_next
;
...
...
@@ -514,14 +515,14 @@ CURLcode Curl_is_connected(struct connectdata *conn,
}
/* nope, not connected for real */
infof
(
data
,
"Connection failed
\n
"
);
if
(
trynextip
(
conn
,
sockindex
,
allow
-
has_passed
,
connected
))
{
if
(
trynextip
(
conn
,
sockindex
,
connected
))
{
code
=
CURLE_COULDNT_CONNECT
;
}
}
else
if
(
WAITCONN_TIMEOUT
!=
rc
)
{
/* nope, not connected */
infof
(
data
,
"Connection failed
\n
"
);
if
(
trynextip
(
conn
,
sockindex
,
allow
-
has_passed
,
connected
))
{
if
(
trynextip
(
conn
,
sockindex
,
connected
))
{
int
error
=
Curl_ourerrno
();
failf
(
data
,
"Failed connect to %s:%d; %s"
,
conn
->
host
.
name
,
conn
->
port
,
Curl_strerror
(
conn
,
error
));
...
...
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