Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
db615241
Commit
db615241
authored
Mar 01, 2007
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed statistic counter leaks per host.
parent
5f0520d3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
12 deletions
+9
-12
src/network/httpd.c
src/network/httpd.c
+9
-12
No files found.
src/network/httpd.c
View file @
db615241
...
...
@@ -94,10 +94,6 @@ struct httpd_host_t
int
*
fds
;
unsigned
nfd
;
/* Statistics */
counter_t
*
p_active_counter
;
counter_t
*
p_total_counter
;
vlc_mutex_t
lock
;
/* all registered url (becarefull that 2 httpd_url_t could point at the same url)
...
...
@@ -2016,11 +2012,8 @@ static void httpd_ClientTlsHsOut( httpd_client_t *cl )
static
void
httpd_HostThread
(
httpd_host_t
*
host
)
{
tls_session_t
*
p_tls
=
NULL
;
host
->
p_total_counter
=
stats_CounterCreate
(
host
,
VLC_VAR_INTEGER
,
STATS_COUNTER
);
host
->
p_active_counter
=
stats_CounterCreate
(
host
,
VLC_VAR_INTEGER
,
STATS_COUNTER
);
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
);
while
(
!
host
->
b_die
)
{
...
...
@@ -2058,7 +2051,7 @@ static void httpd_HostThread( httpd_host_t *host )
cl
->
i_activity_date
+
cl
->
i_activity_timeout
<
now
)
)
)
)
{
httpd_ClientClean
(
cl
);
stats_UpdateInteger
(
host
,
host
->
p_active_counter
,
-
1
,
NULL
);
stats_UpdateInteger
(
host
,
p_active_counter
,
-
1
,
NULL
);
TAB_REMOVE
(
host
->
i_client
,
host
->
client
,
cl
);
free
(
cl
);
i_client
--
;
...
...
@@ -2511,8 +2504,8 @@ static void httpd_HostThread( httpd_host_t *host )
break
;
// wasted TLS session, cannot accept() anymore
}
stats_UpdateInteger
(
host
,
host
->
p_total_counter
,
1
,
NULL
);
stats_UpdateInteger
(
host
,
host
->
p_active_counter
,
1
,
NULL
);
stats_UpdateInteger
(
host
,
p_total_counter
,
1
,
NULL
);
stats_UpdateInteger
(
host
,
p_active_counter
,
1
,
NULL
);
cl
=
httpd_ClientNew
(
fd
,
p_tls
,
now
);
p_tls
=
NULL
;
vlc_mutex_lock
(
&
host
->
lock
);
...
...
@@ -2529,6 +2522,10 @@ static void httpd_HostThread( httpd_host_t *host )
if
(
p_tls
!=
NULL
)
tls_ServerSessionClose
(
p_tls
);
if
(
p_total_counter
)
stats_CounterClean
(
p_total_counter
);
if
(
p_active_counter
)
stats_CounterClean
(
p_active_counter
);
}
#else
/* ENABLE_HTTPD */
...
...
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