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
e04ccbd5
Commit
e04ccbd5
authored
10 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
multi: make multi_runsingle loop internally
simplifies the use of this function at little cost.
parent
1342a96e
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/multi.c
+6
-13
6 additions, 13 deletions
lib/multi.c
with
6 additions
and
13 deletions
lib/multi.c
+
6
−
13
View file @
e04ccbd5
...
...
@@ -927,7 +927,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
bool
protocol_connect
=
FALSE
;
bool
dophase_done
=
FALSE
;
bool
done
=
FALSE
;
CURLMcode
result
=
CURLM_OK
;
CURLMcode
result
;
struct
SingleRequest
*
k
;
long
timeout_ms
;
int
control
;
...
...
@@ -936,9 +936,8 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
return
CURLM_BAD_EASY_HANDLE
;
do
{
/* this is a single-iteration do-while loop just to allow a
break to skip to the end of it */
bool
disconnect_conn
=
FALSE
;
result
=
CURLM_OK
;
/* Handle the case when the pipe breaks, i.e., the connection
we're using gets cleaned up and we're left with nothing. */
...
...
@@ -1752,7 +1751,7 @@ statemachine_end:
result
=
CURLM_CALL_MULTI_PERFORM
;
}
}
}
WHILE_FALSE
;
/* just to break out from! */
}
while
(
result
==
CURLM_CALL_MULTI_PERFORM
);
if
(
CURLM_STATE_COMPLETED
==
data
->
mstate
)
{
/* now fill in the Curl_message with this info */
...
...
@@ -1797,9 +1796,7 @@ CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles)
}
sigpipe_ignore
(
data
,
&
pipe_st
);
do
result
=
multi_runsingle
(
multi
,
now
,
data
);
while
(
CURLM_CALL_MULTI_PERFORM
==
result
);
result
=
multi_runsingle
(
multi
,
now
,
data
);
sigpipe_restore
(
&
pipe_st
);
if
(
data
->
set
.
wildcardmatch
)
{
...
...
@@ -2269,9 +2266,7 @@ static CURLMcode multi_socket(struct Curl_multi *multi,
data
->
easy_conn
->
cselect_bits
=
ev_bitmask
;
sigpipe_ignore
(
data
,
&
pipe_st
);
do
result
=
multi_runsingle
(
multi
,
now
,
data
);
while
(
CURLM_CALL_MULTI_PERFORM
==
result
);
result
=
multi_runsingle
(
multi
,
now
,
data
);
sigpipe_restore
(
&
pipe_st
);
if
(
data
->
easy_conn
&&
...
...
@@ -2313,9 +2308,7 @@ static CURLMcode multi_socket(struct Curl_multi *multi,
SIGPIPE_VARIABLE
(
pipe_st
);
sigpipe_ignore
(
data
,
&
pipe_st
);
do
result
=
multi_runsingle
(
multi
,
now
,
data
);
while
(
CURLM_CALL_MULTI_PERFORM
==
result
);
result
=
multi_runsingle
(
multi
,
now
,
data
);
sigpipe_restore
(
&
pipe_st
);
if
(
CURLM_OK
>=
result
)
...
...
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