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
96a74981
Commit
96a74981
authored
Apr 01, 2006
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Don't assume builddir = srcdir
- Fix minor memleak
parent
b26ea34b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
10 deletions
+23
-10
modules/control/http/http.c
modules/control/http/http.c
+23
-10
No files found.
modules/control/http/http.c
View file @
96a74981
/*****************************************************************************
/*****************************************************************************
* http.c : HTTP/HTTPS Remote control interface
* http.c : HTTP/HTTPS Remote control interface
*****************************************************************************
*****************************************************************************
* Copyright (C) 2001-200
5
the VideoLAN team
* Copyright (C) 2001-200
6
the VideoLAN team
* $Id$
* $Id$
*
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* Authors: Gildas Bazin <gbazin@netcourrier.com>
...
@@ -87,14 +87,15 @@ static void Run ( intf_thread_t *p_intf );
...
@@ -87,14 +87,15 @@ static void Run ( intf_thread_t *p_intf );
* Local functions
* Local functions
*****************************************************************************/
*****************************************************************************/
#if !defined(__APPLE__) && !defined(SYS_BEOS) && !defined(WIN32)
#if !defined(__APPLE__) && !defined(SYS_BEOS) && !defined(WIN32)
static
int
DirectoryCheck
(
char
*
psz_dir
)
static
int
DirectoryCheck
(
c
onst
c
har
*
psz_dir
)
{
{
DIR
*
p_dir
;
DIR
*
p_dir
;
#ifdef HAVE_SYS_STAT_H
#ifdef HAVE_SYS_STAT_H
struct
stat
stat_info
;
struct
stat
stat_info
;
if
(
utf8_stat
(
psz_dir
,
&
stat_info
)
==
-
1
||
!
S_ISDIR
(
stat_info
.
st_mode
)
)
if
(
(
utf8_stat
(
psz_dir
,
&
stat_info
)
==
-
1
)
||
!
S_ISDIR
(
stat_info
.
st_mode
)
)
{
{
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
...
@@ -293,15 +294,27 @@ static int Open( vlc_object_t *p_this )
...
@@ -293,15 +294,27 @@ static int Open( vlc_object_t *p_this )
#else
#else
psz_src
=
config_GetPsz
(
p_intf
,
"http-src"
);
psz_src
=
config_GetPsz
(
p_intf
,
"http-src"
);
if
(
!
psz_src
||
*
psz_src
==
'\0'
)
if
(
(
psz_src
==
NULL
)
||
(
*
psz_src
==
'\0'
)
)
{
{
if
(
!
DirectoryCheck
(
"share/http"
)
)
static
char
const
*
ppsz_paths
[]
=
{
"share/http"
,
"../share/http"
,
DATA_PATH
"/http"
,
NULL
};
unsigned
i
;
if
(
psz_src
!=
NULL
)
{
{
psz_src
=
strdup
(
"share/http"
);
free
(
psz_src
);
psz_src
=
NULL
;
}
}
else
if
(
!
DirectoryCheck
(
DATA_PATH
"/http"
)
)
for
(
i
=
0
;
ppsz_paths
[
i
]
!=
NULL
;
i
++
)
if
(
!
DirectoryCheck
(
ppsz_paths
[
i
]
)
)
{
{
psz_src
=
strdup
(
DATA_PATH
"/http"
);
psz_src
=
strdup
(
ppsz_paths
[
i
]
);
break
;
}
}
}
}
#endif
#endif
...
...
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