Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
8e6a4513
Commit
8e6a4513
authored
Jun 05, 2010
by
Pierre Ynard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Spelling
parent
c60dc271
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
21 additions
and
21 deletions
+21
-21
configure.ac
configure.ac
+3
-3
modules/misc/lua/demux.c
modules/misc/lua/demux.c
+4
-4
modules/misc/lua/extension.c
modules/misc/lua/extension.c
+8
-8
modules/misc/lua/libs/httpd.c
modules/misc/lua/libs/httpd.c
+2
-2
modules/misc/lua/libs/variables.c
modules/misc/lua/libs/variables.c
+1
-1
modules/misc/lua/meta.c
modules/misc/lua/meta.c
+2
-2
modules/misc/lua/services_discovery.c
modules/misc/lua/services_discovery.c
+1
-1
No files found.
configure.ac
View file @
8e6a4513
...
@@ -1541,13 +1541,13 @@ AS_IF([test "x${enable_debug}" = "xno"], [
...
@@ -1541,13 +1541,13 @@ AS_IF([test "x${enable_debug}" = "xno"], [
])
])
dnl
dnl
dnl Allow run
ing as root (useful for people ru
ning on embedded platforms)
dnl Allow run
ning as root (useful for people run
ning on embedded platforms)
dnl
dnl
AC_ARG_ENABLE(run-as-root,
AC_ARG_ENABLE(run-as-root,
[ --enable-run-as-root allow runing VLC as root (default disabled)])
[ --enable-run-as-root allow run
n
ing VLC as root (default disabled)])
AS_IF([test "${enable_run_as_root}" = "yes"],[
AS_IF([test "${enable_run_as_root}" = "yes"],[
AC_DEFINE(ALLOW_RUN_AS_ROOT, 1,
AC_DEFINE(ALLOW_RUN_AS_ROOT, 1,
[Define to 1 to allow runing VLC as root (uid 0).])
[Define to 1 to allow run
n
ing VLC as root (uid 0).])
])
])
dnl
dnl
...
...
modules/misc/lua/demux.c
View file @
8e6a4513
...
@@ -169,14 +169,14 @@ static int probe_luascript( vlc_object_t *p_this, const char * psz_filename,
...
@@ -169,14 +169,14 @@ static int probe_luascript( vlc_object_t *p_this, const char * psz_filename,
if
(
!
lua_isfunction
(
L
,
-
1
)
)
if
(
!
lua_isfunction
(
L
,
-
1
)
)
{
{
msg_Warn
(
p_demux
,
"Error while runing script %s, "
msg_Warn
(
p_demux
,
"Error while run
n
ing script %s, "
"function probe() not found"
,
psz_filename
);
"function probe() not found"
,
psz_filename
);
goto
error
;
goto
error
;
}
}
if
(
lua_pcall
(
L
,
0
,
1
,
0
)
)
if
(
lua_pcall
(
L
,
0
,
1
,
0
)
)
{
{
msg_Warn
(
p_demux
,
"Error while runing script %s, "
msg_Warn
(
p_demux
,
"Error while run
n
ing script %s, "
"function probe(): %s"
,
psz_filename
,
"function probe(): %s"
,
psz_filename
,
lua_tostring
(
L
,
lua_gettop
(
L
)
)
);
lua_tostring
(
L
,
lua_gettop
(
L
)
)
);
goto
error
;
goto
error
;
...
@@ -255,14 +255,14 @@ static int Demux( demux_t *p_demux )
...
@@ -255,14 +255,14 @@ static int Demux( demux_t *p_demux )
if
(
!
lua_isfunction
(
L
,
-
1
)
)
if
(
!
lua_isfunction
(
L
,
-
1
)
)
{
{
msg_Warn
(
p_demux
,
"Error while runing script %s, "
msg_Warn
(
p_demux
,
"Error while run
n
ing script %s, "
"function parse() not found"
,
psz_filename
);
"function parse() not found"
,
psz_filename
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
if
(
lua_pcall
(
L
,
0
,
1
,
0
)
)
if
(
lua_pcall
(
L
,
0
,
1
,
0
)
)
{
{
msg_Warn
(
p_demux
,
"Error while runing script %s, "
msg_Warn
(
p_demux
,
"Error while run
n
ing script %s, "
"function parse(): %s"
,
psz_filename
,
"function parse(): %s"
,
psz_filename
,
lua_tostring
(
L
,
lua_gettop
(
L
)
)
);
lua_tostring
(
L
,
lua_gettop
(
L
)
)
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
...
...
modules/misc/lua/extension.c
View file @
8e6a4513
...
@@ -266,14 +266,14 @@ int ScanLuaCallback( vlc_object_t *p_this, const char *psz_script,
...
@@ -266,14 +266,14 @@ int ScanLuaCallback( vlc_object_t *p_this, const char *psz_script,
if
(
!
lua_isfunction
(
L
,
-
1
)
)
if
(
!
lua_isfunction
(
L
,
-
1
)
)
{
{
msg_Warn
(
p_mgr
,
"Error while runing script %s, "
msg_Warn
(
p_mgr
,
"Error while run
n
ing script %s, "
"function descriptor() not found"
,
psz_script
);
"function descriptor() not found"
,
psz_script
);
goto
exit
;
goto
exit
;
}
}
if
(
lua_pcall
(
L
,
0
,
1
,
0
)
)
if
(
lua_pcall
(
L
,
0
,
1
,
0
)
)
{
{
msg_Warn
(
p_mgr
,
"Error while runing script %s, "
msg_Warn
(
p_mgr
,
"Error while run
n
ing script %s, "
"function descriptor(): %s"
,
psz_script
,
"function descriptor(): %s"
,
psz_script
,
lua_tostring
(
L
,
lua_gettop
(
L
)
)
);
lua_tostring
(
L
,
lua_gettop
(
L
)
)
);
goto
exit
;
goto
exit
;
...
@@ -656,14 +656,14 @@ static int GetMenuEntries( extensions_manager_t *p_mgr, extension_t *p_ext,
...
@@ -656,14 +656,14 @@ static int GetMenuEntries( extensions_manager_t *p_mgr, extension_t *p_ext,
if
(
!
lua_isfunction
(
L
,
-
1
)
)
if
(
!
lua_isfunction
(
L
,
-
1
)
)
{
{
msg_Warn
(
p_mgr
,
"Error while runing script %s, "
msg_Warn
(
p_mgr
,
"Error while run
n
ing script %s, "
"function menu() not found"
,
p_ext
->
psz_name
);
"function menu() not found"
,
p_ext
->
psz_name
);
goto
exit
;
goto
exit
;
}
}
if
(
lua_pcall
(
L
,
0
,
1
,
0
)
)
if
(
lua_pcall
(
L
,
0
,
1
,
0
)
)
{
{
msg_Warn
(
p_mgr
,
"Error while runing script %s, "
msg_Warn
(
p_mgr
,
"Error while run
n
ing script %s, "
"function menu(): %s"
,
p_ext
->
psz_name
,
"function menu(): %s"
,
p_ext
->
psz_name
,
lua_tostring
(
L
,
lua_gettop
(
L
)
)
);
lua_tostring
(
L
,
lua_gettop
(
L
)
)
);
goto
exit
;
goto
exit
;
...
@@ -828,7 +828,7 @@ int lua_ExecuteFunctionVa( extensions_manager_t *p_mgr, extension_t *p_ext,
...
@@ -828,7 +828,7 @@ int lua_ExecuteFunctionVa( extensions_manager_t *p_mgr, extension_t *p_ext,
if
(
!
lua_isfunction
(
L
,
-
1
)
)
if
(
!
lua_isfunction
(
L
,
-
1
)
)
{
{
msg_Warn
(
p_mgr
,
"Error while runing script %s, "
msg_Warn
(
p_mgr
,
"Error while run
n
ing script %s, "
"function %s() not found"
,
p_ext
->
psz_name
,
psz_function
);
"function %s() not found"
,
p_ext
->
psz_name
,
psz_function
);
goto
exit
;
goto
exit
;
}
}
...
@@ -854,7 +854,7 @@ int lua_ExecuteFunctionVa( extensions_manager_t *p_mgr, extension_t *p_ext,
...
@@ -854,7 +854,7 @@ int lua_ExecuteFunctionVa( extensions_manager_t *p_mgr, extension_t *p_ext,
}
}
if
(
lua_pcall
(
L
,
i_args
,
1
,
0
)
)
if
(
lua_pcall
(
L
,
i_args
,
1
,
0
)
)
{
{
msg_Warn
(
p_mgr
,
"Error while runing script %s, "
msg_Warn
(
p_mgr
,
"Error while run
n
ing script %s, "
"function %s(): %s"
,
p_ext
->
psz_name
,
psz_function
,
"function %s(): %s"
,
p_ext
->
psz_name
,
psz_function
,
lua_tostring
(
L
,
lua_gettop
(
L
)
)
);
lua_tostring
(
L
,
lua_gettop
(
L
)
)
);
goto
exit
;
goto
exit
;
...
@@ -885,7 +885,7 @@ int lua_ExtensionTriggerMenu( extensions_manager_t *p_mgr,
...
@@ -885,7 +885,7 @@ int lua_ExtensionTriggerMenu( extensions_manager_t *p_mgr,
lua_getglobal
(
L
,
"trigger_menu"
);
lua_getglobal
(
L
,
"trigger_menu"
);
if
(
!
lua_isfunction
(
L
,
-
1
)
)
if
(
!
lua_isfunction
(
L
,
-
1
)
)
{
{
msg_Warn
(
p_mgr
,
"Error while runing script %s, "
msg_Warn
(
p_mgr
,
"Error while run
n
ing script %s, "
"function trigger_menu() not found"
,
p_ext
->
psz_name
);
"function trigger_menu() not found"
,
p_ext
->
psz_name
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
...
@@ -895,7 +895,7 @@ int lua_ExtensionTriggerMenu( extensions_manager_t *p_mgr,
...
@@ -895,7 +895,7 @@ int lua_ExtensionTriggerMenu( extensions_manager_t *p_mgr,
if
(
lua_pcall
(
L
,
1
,
1
,
0
)
!=
0
)
if
(
lua_pcall
(
L
,
1
,
1
,
0
)
!=
0
)
{
{
msg_Warn
(
p_mgr
,
"Error while runing script %s, "
msg_Warn
(
p_mgr
,
"Error while run
n
ing script %s, "
"function trigger_menu(): %s"
,
p_ext
->
psz_name
,
"function trigger_menu(): %s"
,
p_ext
->
psz_name
,
lua_tostring
(
L
,
lua_gettop
(
L
)
)
);
lua_tostring
(
L
,
lua_gettop
(
L
)
)
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
...
...
modules/misc/lua/libs/httpd.c
View file @
8e6a4513
...
@@ -145,7 +145,7 @@ static int vlclua_httpd_handler_callback(
...
@@ -145,7 +145,7 @@ static int vlclua_httpd_handler_callback(
/* function data err */
/* function data err */
vlc_object_t
*
p_this
=
vlclua_get_this
(
L
);
vlc_object_t
*
p_this
=
vlclua_get_this
(
L
);
const
char
*
psz_err
=
lua_tostring
(
L
,
-
1
);
const
char
*
psz_err
=
lua_tostring
(
L
,
-
1
);
msg_Err
(
p_this
,
"Error while runing the lua HTTPd handler "
msg_Err
(
p_this
,
"Error while run
n
ing the lua HTTPd handler "
"callback: %s"
,
psz_err
);
"callback: %s"
,
psz_err
);
lua_settop
(
L
,
2
);
lua_settop
(
L
,
2
);
/* function data */
/* function data */
...
@@ -237,7 +237,7 @@ static int vlclua_httpd_file_callback(
...
@@ -237,7 +237,7 @@ static int vlclua_httpd_file_callback(
/* function data err */
/* function data err */
vlc_object_t
*
p_this
=
vlclua_get_this
(
L
);
vlc_object_t
*
p_this
=
vlclua_get_this
(
L
);
const
char
*
psz_err
=
lua_tostring
(
L
,
-
1
);
const
char
*
psz_err
=
lua_tostring
(
L
,
-
1
);
msg_Err
(
p_this
,
"Error while runing the lua HTTPd file callback: %s"
,
msg_Err
(
p_this
,
"Error while run
n
ing the lua HTTPd file callback: %s"
,
psz_err
);
psz_err
);
lua_settop
(
L
,
2
);
lua_settop
(
L
,
2
);
/* function data */
/* function data */
...
...
modules/misc/lua/libs/variables.c
View file @
8e6a4513
...
@@ -320,7 +320,7 @@ static int vlclua_callback( vlc_object_t *p_this, char const *psz_var,
...
@@ -320,7 +320,7 @@ static int vlclua_callback( vlc_object_t *p_this, char const *psz_var,
{
{
/* errormessage */
/* errormessage */
const
char
*
psz_err
=
lua_tostring
(
L
,
-
1
);
const
char
*
psz_err
=
lua_tostring
(
L
,
-
1
);
msg_Err
(
p_this
,
"Error while runing lua interface callback: %s"
,
msg_Err
(
p_this
,
"Error while run
n
ing lua interface callback: %s"
,
psz_err
);
psz_err
);
/* empty the stack (should only contain the error message) */
/* empty the stack (should only contain the error message) */
lua_settop
(
L
,
0
);
lua_settop
(
L
,
0
);
...
...
modules/misc/lua/meta.c
View file @
8e6a4513
...
@@ -111,14 +111,14 @@ static int run( vlc_object_t *p_this, const char * psz_filename,
...
@@ -111,14 +111,14 @@ static int run( vlc_object_t *p_this, const char * psz_filename,
if
(
!
lua_isfunction
(
L
,
lua_gettop
(
L
)
)
)
if
(
!
lua_isfunction
(
L
,
lua_gettop
(
L
)
)
)
{
{
msg_Warn
(
p_this
,
"Error while runing script %s, "
msg_Warn
(
p_this
,
"Error while run
n
ing script %s, "
"function %s() not found"
,
psz_filename
,
luafunction
);
"function %s() not found"
,
psz_filename
,
luafunction
);
goto
error
;
goto
error
;
}
}
if
(
lua_pcall
(
L
,
0
,
1
,
0
)
)
if
(
lua_pcall
(
L
,
0
,
1
,
0
)
)
{
{
msg_Warn
(
p_this
,
"Error while runing script %s, "
msg_Warn
(
p_this
,
"Error while run
n
ing script %s, "
"function %s(): %s"
,
psz_filename
,
luafunction
,
"function %s(): %s"
,
psz_filename
,
luafunction
,
lua_tostring
(
L
,
lua_gettop
(
L
)
)
);
lua_tostring
(
L
,
lua_gettop
(
L
)
)
);
goto
error
;
goto
error
;
...
...
modules/misc/lua/services_discovery.c
View file @
8e6a4513
...
@@ -164,7 +164,7 @@ static void* Run( void *data )
...
@@ -164,7 +164,7 @@ static void* Run( void *data )
lua_getglobal
(
L
,
"main"
);
lua_getglobal
(
L
,
"main"
);
if
(
!
lua_isfunction
(
L
,
lua_gettop
(
L
)
)
||
lua_pcall
(
L
,
0
,
1
,
0
)
)
if
(
!
lua_isfunction
(
L
,
lua_gettop
(
L
)
)
||
lua_pcall
(
L
,
0
,
1
,
0
)
)
{
{
msg_Err
(
p_sd
,
"Error while runing script %s, "
msg_Err
(
p_sd
,
"Error while run
n
ing script %s, "
"function main(): %s"
,
p_sys
->
psz_filename
,
"function main(): %s"
,
p_sys
->
psz_filename
,
lua_tostring
(
L
,
lua_gettop
(
L
)
)
);
lua_tostring
(
L
,
lua_gettop
(
L
)
)
);
lua_pop
(
L
,
1
);
lua_pop
(
L
,
1
);
...
...
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