Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
49947b14
Commit
49947b14
authored
Mar 06, 2003
by
Laurent Aimar
Browse files
* http: fixed a segfault while using it more than once.
parent
fe4a517f
Changes
2
Show whitespace changes
Inline
Side-by-side
include/httpd.h
View file @
49947b14
...
...
@@ -2,7 +2,7 @@
* httpd.h
*****************************************************************************
* Copyright (C) 2001-2003 VideoLAN
* $Id: httpd.h,v 1.
2
2003/0
2/25 17:17:43
fenrir Exp $
* $Id: httpd.h,v 1.
3
2003/0
3/06 11:09:56
fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
...
...
@@ -76,6 +76,7 @@ static inline httpd_t* httpd_Find( vlc_object_t *p_this, vlc_bool_t b_create )
p_httpd
=
vlc_object_find
(
p_this
,
VLC_OBJECT_HTTPD
,
FIND_ANYWHERE
);
if
(
!
p_httpd
)
{
msg_Info
(
p_this
,
"creating new http daemon"
);
if
(
!
b_create
)
{
return
(
NULL
);
...
...
@@ -98,6 +99,7 @@ static inline httpd_t* httpd_Find( vlc_object_t *p_this, vlc_bool_t b_create )
}
vlc_object_yield
(
p_httpd
);
vlc_object_attach
(
p_httpd
,
p_this
->
p_vlc
);
}
return
(
p_httpd
);
...
...
@@ -106,6 +108,10 @@ static inline httpd_t* httpd_Find( vlc_object_t *p_this, vlc_bool_t b_create )
static
inline
void
httpd_Release
(
httpd_t
*
p_httpd
)
{
vlc_object_release
(
p_httpd
);
if
(
p_httpd
->
i_refcount
<=
0
)
{
vlc_object_detach
(
p_httpd
);
}
}
...
...
modules/misc/httpd.c
View file @
49947b14
...
...
@@ -2,7 +2,7 @@
* httpd.c
*****************************************************************************
* Copyright (C) 2001-2003 VideoLAN
* $Id: httpd.c,v 1.
6
2003/03/0
3
1
4:21:08 gbazin
Exp $
* $Id: httpd.c,v 1.
7
2003/03/0
6
1
1:09:56 fenrir
Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
...
...
@@ -438,7 +438,7 @@ static httpd_host_t *_RegisterHost( httpd_sys_t *p_httpt, char *psz_host_addr, i
/* yes, increment ref count and succed */
p_httpt
->
host
[
i
]
->
i_ref
++
;
vlc_mutex_unlock
(
&
p_httpt
->
host_lock
);
return
NULL
;
return
(
p_httpt
->
host
[
i
]
)
;
}
/* need to add a new listening socket */
...
...
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