Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
220001b9
Commit
220001b9
authored
Jan 17, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
httpd: use own thread
parent
05974032
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
src/network/httpd.c
src/network/httpd.c
+7
-8
No files found.
src/network/httpd.c
View file @
220001b9
...
...
@@ -95,6 +95,7 @@ struct httpd_host_t
int
*
fds
;
unsigned
nfd
;
vlc_thread_t
thread
;
vlc_mutex_t
lock
;
vlc_cond_t
wait
;
...
...
@@ -963,7 +964,7 @@ void httpd_StreamDelete( httpd_stream_t *stream )
/*****************************************************************************
* Low level
*****************************************************************************/
static
void
*
httpd_HostThread
(
v
lc_object_t
*
);
static
void
*
httpd_HostThread
(
v
oid
*
);
/* create a new host */
httpd_host_t
*
httpd_HostNew
(
vlc_object_t
*
p_this
,
const
char
*
psz_host
,
...
...
@@ -1109,7 +1110,7 @@ httpd_host_t *httpd_TLSHostNew( vlc_object_t *p_this, const char *psz_hostname,
host
->
p_tls
=
p_tls
;
/* create the thread */
if
(
vlc_
thread_create
(
host
,
"httpd host thread"
,
httpd_HostThread
,
if
(
vlc_
clone
(
&
host
->
thread
,
httpd_HostThread
,
host
,
VLC_THREAD_PRIORITY_LOW
)
)
{
msg_Err
(
p_this
,
"cannot spawn http host thread"
);
...
...
@@ -1172,7 +1173,7 @@ void httpd_HostDelete( httpd_host_t *host )
TAB_REMOVE
(
httpd
->
i_host
,
httpd
->
host
,
host
);
vlc_object_kill
(
host
);
vlc_
thread_join
(
host
);
vlc_
join
(
host
->
thread
,
NULL
);
msg_Dbg
(
host
,
"HTTP host removed"
);
...
...
@@ -2037,13 +2038,12 @@ static void httpd_ClientTlsHsOut( httpd_client_t *cl )
}
}
static
void
*
httpd_HostThread
(
v
lc_object_t
*
p_this
)
static
void
*
httpd_HostThread
(
v
oid
*
data
)
{
httpd_host_t
*
host
=
(
httpd_host_t
*
)
p_this
;
httpd_host_t
*
host
=
data
;
tls_session_t
*
p_tls
=
NULL
;
counter_t
*
p_total_counter
=
stats_CounterCreate
(
host
,
VLC_VAR_INTEGER
,
STATS_COUNTER
);
counter_t
*
p_active_counter
=
stats_CounterCreate
(
host
,
VLC_VAR_INTEGER
,
STATS_COUNTER
);
int
canc
=
vlc_savecancel
();
int
evfd
=
vlc_object_waitpipe
(
VLC_OBJECT
(
host
)
);
for
(
;;
)
...
...
@@ -2572,6 +2572,5 @@ static void* httpd_HostThread( vlc_object_t *p_this )
stats_CounterClean
(
p_total_counter
);
if
(
p_active_counter
)
stats_CounterClean
(
p_active_counter
);
vlc_restorecancel
(
canc
);
return
NULL
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment