]> git.sesse.net Git - vlc/blobdiff - modules/lua/intf.c
Android: always return an empty proxy
[vlc] / modules / lua / intf.c
index a807a9909e58a8d6117f6288481221eff16ae3a1..e382647dcdf400f04912fbbdd6028852a236b920 100644 (file)
@@ -89,7 +89,7 @@ static char *MakeConfig( intf_thread_t *p_intf, const char *name )
         {
             vlc_url_t url;
             vlc_UrlParse( &url, psz_host, 0 );
-            int i_port = var_InheritInteger( p_intf, "telnet-port" );
+            unsigned i_port = var_InheritInteger( p_intf, "telnet-port" );
             if ( url.i_port != 0 )
             {
                 if ( i_port == TELNETPORT_DEFAULT )
@@ -221,7 +221,7 @@ static int Start_LuaIntf( vlc_object_t *p_this, const char *name )
         return VLC_ENOMEM;
     }
     p_sys = p_intf->p_sys;
-    p_sys->psz_filename = vlclua_find_file( p_this, "intf", name );
+    p_sys->psz_filename = vlclua_find_file( "intf", name );
     if( !p_sys->psz_filename )
     {
         msg_Err( p_intf, "Couldn't find lua interface script \"%s\".",
@@ -246,7 +246,6 @@ static int Start_LuaIntf( vlc_object_t *p_this, const char *name )
     luaL_register( L, "vlc", p_reg );
 
     /* register submodules */
-    luaopen_acl( L );
     luaopen_config( L );
     luaopen_volume( L );
     luaopen_httpd( L );
@@ -267,7 +266,7 @@ static int Start_LuaIntf( vlc_object_t *p_this, const char *name )
     luaopen_gettext( L );
     luaopen_xml( L );
     luaopen_equalizer( L );
-#ifdef WIN32
+#if defined(WIN32) && !defined(WINAPI_FAMILY_APP)
     luaopen_win( L );
 #endif
 
@@ -275,7 +274,7 @@ static int Start_LuaIntf( vlc_object_t *p_this, const char *name )
     lua_pop( L, 1 );
 
     /* Setup the module search path */
-    if( vlclua_add_modules_path( p_intf, L, p_sys->psz_filename ) )
+    if( vlclua_add_modules_path( L, p_sys->psz_filename ) )
     {
         msg_Warn( p_intf, "Error while setting the module search path for %s",
                   p_sys->psz_filename );
@@ -347,7 +346,7 @@ static int Start_LuaIntf( vlc_object_t *p_this, const char *name )
         /* msg_Warn( p_intf, "The `telnet' lua interface script was replaced "
                           "by `cli', please update your configuration!" ); */
 
-        char *wrapped_file = vlclua_find_file( p_this, "intf", "cli" );
+        char *wrapped_file = vlclua_find_file( "intf", "cli" );
         if( !wrapped_file )
         {
             msg_Err( p_intf, "Couldn't find lua interface script \"cli\", "
@@ -362,12 +361,8 @@ static int Start_LuaIntf( vlc_object_t *p_this, const char *name )
 
     p_sys->L = L;
 
-    vlc_mutex_init( &p_sys->lock );
-    p_sys->exiting = false;
-
     if( vlc_clone( &p_sys->thread, Run, p_intf, VLC_THREAD_PRIORITY_LOW ) )
     {
-        vlc_mutex_destroy( &p_sys->lock );
         lua_close( p_sys->L );
         goto error;
     }
@@ -387,13 +382,7 @@ void Close_LuaIntf( vlc_object_t *p_this )
     intf_sys_t *p_sys = p_intf->p_sys;
 
     vlc_cancel( p_sys->thread );
-
-    vlc_mutex_lock( &p_sys->lock );
-    p_sys->exiting = true;
-    vlc_mutex_unlock( &p_sys->lock );
     vlc_join( p_sys->thread, NULL );
-    vlc_mutex_destroy( &p_sys->lock );
-
     lua_close( p_sys->L );
 
     free( p_sys->psz_filename );