Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
9b6ca602
Commit
9b6ca602
authored
May 05, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use config_Get*Dir
parent
f2ba521b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
27 deletions
+43
-27
modules/gui/skins2/win32/win32_factory.cpp
modules/gui/skins2/win32/win32_factory.cpp
+3
-2
modules/gui/skins2/x11/x11_factory.cpp
modules/gui/skins2/x11/x11_factory.cpp
+3
-2
modules/misc/gnutls.c
modules/misc/gnutls.c
+22
-20
modules/misc/lua/vlc.c
modules/misc/lua/vlc.c
+15
-3
No files found.
modules/gui/skins2/win32/win32_factory.cpp
View file @
9b6ca602
...
...
@@ -225,8 +225,9 @@ bool Win32Factory::init()
}
// Initialize the resource path
m_resourcePath
.
push_back
(
(
string
)
getIntf
()
->
p_libvlc
->
psz_datadir
+
"
\\
skins"
);
char
*
datadir
=
config_GetUserDataDir
();
m_resourcePath
.
push_back
(
(
string
)
datadir
+
"
\\
skins"
);
free
(
datadir
);
m_resourcePath
.
push_back
(
(
string
)
config_GetDataDir
()
+
"
\\
skins"
);
m_resourcePath
.
push_back
(
(
string
)
config_GetDataDir
()
+
...
...
modules/gui/skins2/x11/x11_factory.cpp
View file @
9b6ca602
...
...
@@ -71,8 +71,9 @@ bool X11Factory::init()
ConnectionNumber
(
pDisplay
)
);
// Initialize the resource path
m_resourcePath
.
push_back
(
(
string
)
getIntf
()
->
p_libvlc
->
psz_datadir
+
+
"/skins2"
);
char
*
datadir
=
config_GetUserDataDir
();
m_resourcePath
.
push_back
(
(
string
)
datadir
+
"/skins2"
);
free
(
datadir
);
m_resourcePath
.
push_back
(
(
string
)
"share/skins2"
);
m_resourcePath
.
push_back
(
(
string
)
config_GetDataDir
()
+
"/skins2"
);
...
...
modules/misc/gnutls.c
View file @
9b6ca602
...
...
@@ -643,13 +643,6 @@ static int OpenClient (vlc_object_t *obj)
p_sys
->
session
.
b_handshaked
=
false
;
const
char
*
homedir
=
obj
->
p_libvlc
->
psz_datadir
,
*
datadir
=
config_GetDataDir
();
size_t
l1
=
strlen
(
homedir
),
l2
=
strlen
(
datadir
);
char
path
[((
l1
>
l2
)
?
l1
:
l2
)
+
sizeof
(
"/ca-certificates.crt"
)];
// > sizeof ("/ssl/private")
// > sizeof ("/ssl/certs")
i_val
=
gnutls_certificate_allocate_credentials
(
&
p_sys
->
x509_cred
);
if
(
i_val
!=
0
)
{
...
...
@@ -658,23 +651,32 @@ static int OpenClient (vlc_object_t *obj)
goto
error
;
}
sprintf
(
path
,
"%s/ssl"
,
homedir
);
utf8_mkdir
(
path
,
0755
);
sprintf
(
path
,
"%s/ssl/certs"
,
homedir
);
gnutls_Addx509Directory
(
VLC_OBJECT
(
p_session
),
p_sys
->
x509_cred
,
path
,
false
);
char
*
userdir
=
config_GetUserDataDir
();
if
(
userdir
!=
NULL
)
{
char
path
[
strlen
(
userdir
)
+
sizeof
(
"/ssl/private"
)];
sprintf
(
path
,
"%s/ssl"
,
userdir
);
utf8_mkdir
(
path
,
0755
);
sprintf
(
path
,
"%s/ssl/certs"
,
userdir
);
gnutls_Addx509Directory
(
VLC_OBJECT
(
p_session
),
p_sys
->
x509_cred
,
path
,
false
);
sprintf
(
path
,
"%s/ssl/private"
,
userdir
);
gnutls_Addx509Directory
(
VLC_OBJECT
(
p_session
),
p_sys
->
x509_cred
,
path
,
true
);
free
(
userdir
);
}
sprintf
(
path
,
"%s/ca-certificates.crt"
,
datadir
);
gnutls_Addx509File
(
VLC_OBJECT
(
p_session
),
p_sys
->
x509_cred
,
path
,
false
);
const
char
*
datadir
=
config_GetDataDir
();
{
char
path
[
strlen
(
datadir
)
+
sizeof
(
"/ca-certificates.crt"
)];
sprintf
(
path
,
"%s/ca-certificates.crt"
,
datadir
);
gnutls_Addx509File
(
VLC_OBJECT
(
p_session
),
p_sys
->
x509_cred
,
path
,
false
);
}
p_session
->
pf_handshake
=
gnutls_HandshakeAndValidate
;
/*p_session->pf_handshake = gnutls_ContinueHandshake;*/
sprintf
(
path
,
"%s/ssl/private"
,
homedir
);
gnutls_Addx509Directory
(
VLC_OBJECT
(
p_session
),
p_sys
->
x509_cred
,
path
,
true
);
i_val
=
gnutls_init
(
&
p_sys
->
session
.
session
,
GNUTLS_CLIENT
);
if
(
i_val
!=
0
)
{
...
...
modules/misc/lua/vlc.c
View file @
9b6ca602
...
...
@@ -164,12 +164,16 @@ int vlclua_homedir( lua_State *L )
}
int
vlclua_configdir
(
lua_State
*
L
)
{
lua_pushstring
(
L
,
vlclua_get_this
(
L
)
->
p_libvlc
->
psz_configdir
);
char
*
dir
=
config_GetConfigDir
();
lua_pushstring
(
L
,
dir
);
free
(
dir
);
return
1
;
}
int
vlclua_cachedir
(
lua_State
*
L
)
{
lua_pushstring
(
L
,
vlclua_get_this
(
L
)
->
p_libvlc
->
psz_cachedir
);
char
*
dir
=
config_GetCacheDir
();
lua_pushstring
(
L
,
dir
);
free
(
dir
);
return
1
;
}
int
vlclua_datadir_list
(
lua_State
*
L
)
...
...
@@ -400,9 +404,17 @@ int vlclua_dir_list( vlc_object_t *p_this, const char *luadirname,
char
**
ppsz_dir_list
)
{
int
i
=
0
;
char
*
datadir
=
config_GetUserDataDir
();
if
(
datadir
==
NULL
)
return
VLC_ENOMEM
;
if
(
asprintf
(
&
ppsz_dir_list
[
i
],
"%s"
DIR_SEP
"lua"
DIR_SEP
"%s"
,
p_this
->
p_libvlc
->
psz_datadir
,
luadirname
)
<
0
)
datadir
,
luadirname
)
<
0
)
{
free
(
datadir
);
return
VLC_ENOMEM
;
}
free
(
datadir
);
i
++
;
# if defined(__APPLE__) || defined(SYS_BEOS) || defined(WIN32)
...
...
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