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
e66cdacb
Commit
e66cdacb
authored
23 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
minor changes
parent
c67f2da2
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/multi.c
+17
-11
17 additions, 11 deletions
lib/multi.c
lib/multi.h
+1
-0
1 addition, 0 deletions
lib/multi.h
with
18 additions
and
11 deletions
lib/multi.c
+
17
−
11
View file @
e66cdacb
...
...
@@ -220,6 +220,7 @@ CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles)
struct
Curl_multi
*
multi
=
(
struct
Curl_multi
*
)
multi_handle
;
struct
Curl_one_easy
*
easy
;
bool
done
;
CURLMcode
result
=
CURLM_OK
;
if
(
!
GOOD_MULTI_HANDLE
(
multi
))
return
CURLM_BAD_HANDLE
;
...
...
@@ -229,28 +230,30 @@ CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles)
switch
(
easy
->
state
)
{
case
CURLM_STATE_INIT
:
/* init this transfer. Hm, uh, I can't think of anything to init
right now, let's skip over to CONNECT at once!
easy->result = Curl_init(easy->easy_handle);
if(CURLE_OK == easy->result)
*/
/* after init, go CONNECT */
easy
->
state
=
CURLM_STATE_CONNECT
;
/* init this transfer. */
easy
->
result
=
Curl_pretransfer
(
easy
->
easy_handle
);
if
(
CURLE_OK
==
easy
->
result
)
{
/* after init, go CONNECT */
easy
->
state
=
CURLM_STATE_CONNECT
;
result
=
CURLM_CALL_MULTI_PERFORM
;
}
break
;
case
CURLM_STATE_CONNECT
:
/* connect */
easy
->
result
=
Curl_connect
(
easy
->
easy_handle
);
/* after connect, go DO */
if
(
CURLE_OK
==
easy
->
result
)
if
(
CURLE_OK
==
easy
->
result
)
{
easy
->
state
=
CURLM_STATE_DO
;
result
=
CURLM_CALL_MULTI_PERFORM
;
}
break
;
case
CURLM_STATE_DO
:
/* Do the fetch or put request */
easy
->
result
=
Curl_do
(
easy
->
easy_handle
);
/* after do, go PERFORM */
if
(
CURLE_OK
==
easy
->
result
)
if
(
CURLE_OK
==
easy
->
result
)
{
easy
->
state
=
CURLM_STATE_PERFORM
;
}
break
;
case
CURLM_STATE_PERFORM
:
/* read/write data if it is ready to do so */
...
...
@@ -258,8 +261,11 @@ CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles)
/* hm, when we follow redirects, we may need to go back to the CONNECT
state */
/* after the transfer is done, go DONE */
if
(
TRUE
==
done
)
if
(
TRUE
==
done
)
{
/* call this even if the readwrite function returned error */
easy
->
result
=
Curl_posttransfer
(
easy
->
easy_handle
);
easy
->
state
=
CURLM_STATE_DONE
;
}
break
;
case
CURLM_STATE_DONE
:
/* post-transfer command */
...
...
This diff is collapsed.
Click to expand it.
lib/multi.h
+
1
−
0
View file @
e66cdacb
...
...
@@ -55,6 +55,7 @@
typedef
void
CURLM
;
typedef
enum
{
CURLM_CALL_MULTI_PERFORM
=-
1
,
/* please call curl_multi_perform() soon */
CURLM_OK
,
CURLM_BAD_HANDLE
,
/* the passed-in handle is not a valid CURLM handle */
CURLM_BAD_EASY_HANDLE
,
/* an easy handle was not good/valid */
...
...
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