[vlc-devel] commit: Fix HTTP interface with --disable-vlm ( Rémi Denis-Courmont )
git version control
git at videolan.org
Tue May 27 19:57:52 CEST 2008
vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Tue May 27 20:59:16 2008 +0300| [696d57444256a66823a493de08274ca6316ebf8e]
Fix HTTP interface with --disable-vlm
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=696d57444256a66823a493de08274ca6316ebf8e
---
modules/control/http/http.c | 5 ++---
modules/control/http/macro.c | 5 ++++-
modules/control/http/mvar.c | 5 ++---
modules/control/http/rpn.c | 2 ++
4 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/modules/control/http/http.c b/modules/control/http/http.c
index 9aab704..5f3396a 100644
--- a/modules/control/http/http.c
+++ b/modules/control/http/http.c
@@ -338,13 +338,12 @@ static void Close ( vlc_object_t *p_this )
{
intf_thread_t *p_intf = (intf_thread_t *)p_this;
intf_sys_t *p_sys = p_intf->p_sys;
-
int i;
+#ifdef ENABLE_VLM
if( p_sys->p_vlm )
- {
vlm_Delete( p_sys->p_vlm );
- }
+#endif
for( i = 0; i < p_sys->i_files; i++ )
{
if( p_sys->pp_files[i]->b_handler )
diff --git a/modules/control/http/macro.c b/modules/control/http/macro.c
index 8dd01ce..c676d10 100644
--- a/modules/control/http/macro.c
+++ b/modules/control/http/macro.c
@@ -530,6 +530,7 @@ static void MacroDo( httpd_file_sys_t *p_args,
vlc_object_kill( p_intf->p_libvlc );
break;
}
+#ifdef ENABLE_VLM
/* vlm */
case MVLC_VLM_NEW:
case MVLC_VLM_SETUP:
@@ -679,7 +680,7 @@ static void MacroDo( httpd_file_sys_t *p_args,
vlm_MessageDelete( vlm_answer );
break;
}
-
+#endif /* ENABLE_VLM */
default:
if( *control )
{
@@ -1043,12 +1044,14 @@ void Execute( httpd_file_sys_t *p_args,
p_intf->p_sys->p_input,
m.param2 );
}
+#ifdef ENABLE_VLM
else if( !strcmp( m.param2, "vlm" ) )
{
if( p_intf->p_sys->p_vlm == NULL )
p_intf->p_sys->p_vlm = vlm_New( p_intf );
index = mvar_VlmSetNew( m.param1, p_intf->p_sys->p_vlm );
}
+#endif
#if 0
else if( !strcmp( m.param2, "hosts" ) )
{
diff --git a/modules/control/http/mvar.c b/modules/control/http/mvar.c
index 99b36b0..e1a3024 100644
--- a/modules/control/http/mvar.c
+++ b/modules/control/http/mvar.c
@@ -668,15 +668,14 @@ static void mvar_VlmSetNewLoop( char *name, vlm_t *vlm, mvar_t *s,
mvar_t *mvar_VlmSetNew( char *name, vlm_t *vlm )
{
mvar_t *s = mvar_New( name, "set" );
+#ifdef ENABLE_VLM
vlm_message_t *msg;
int i;
if( vlm == NULL ) return s;
if( vlm_ExecuteCommand( vlm, "show", &msg ) )
- {
return s;
- }
for( i = 0; i < msg->i_child; i++ )
{
@@ -702,6 +701,6 @@ mvar_t *mvar_VlmSetNew( char *name, vlm_t *vlm )
}
}
vlm_MessageDelete( msg );
-
+#endif /* ENABLE_VLM */
return s;
}
diff --git a/modules/control/http/rpn.c b/modules/control/http/rpn.c
index 757c26c..2f226c6 100644
--- a/modules/control/http/rpn.c
+++ b/modules/control/http/rpn.c
@@ -1006,6 +1006,7 @@ void EvaluateRPN( intf_thread_t *p_intf, mvar_t *vars,
free( psz_meta );
free( psz_val );
}
+#ifdef ENABLE_VLM
else if( !strcmp( s, "vlm_command" ) || !strcmp( s, "vlm_cmd" ) )
{
char *psz_elt;
@@ -1056,6 +1057,7 @@ void EvaluateRPN( intf_thread_t *p_intf, mvar_t *vars,
free( psz_cmd );
free( psz_error );
}
+#endif /* ENABLE_VLM */
else if( !strcmp( s, "snapshot" ) )
{
if( p_sys->p_input )
More information about the vlc-devel
mailing list