]> git.sesse.net Git - vlc/blobdiff - modules/lua/vlc.c
ASF: help stupid compiler
[vlc] / modules / lua / vlc.c
index 88e23e8a01d12b134be36a99102bec4a5e303e3f..5433eb89bb8af579b806a8d2ba1456db9439adb2 100644 (file)
 
 #define CONFIG_TEXT N_("Lua interface configuration")
 #define CONFIG_LONGTEXT N_("Lua interface configuration string. Format is: '[\"<interface module name>\"] = { <option> = <value>, ...}, ...'.")
-#define HOST_TEXT N_( "Host address" )
-#define HOST_LONGTEXT N_( \
-    "Address and port the HTTP interface will listen on. It defaults to " \
-    "all network interfaces (0.0.0.0)." \
-    " If you want the HTTP interface to be available only on the local " \
-    "machine, enter 127.0.0.1" )
 #define SRC_TEXT N_( "Source directory" )
 #define SRC_LONGTEXT N_( "Source directory" )
 #define INDEX_TEXT N_( "Directory index" )
@@ -108,7 +102,6 @@ vlc_module_begin ()
 
     add_submodule ()
         set_section( N_("Lua HTTP"), 0 )
-            add_string ( "http-host", NULL, HOST_TEXT, HOST_LONGTEXT, true )
             add_string ( "http-src",  NULL, SRC_TEXT,  SRC_LONGTEXT,  true )
             add_bool   ( "http-index", false, INDEX_TEXT, INDEX_LONGTEXT, true )
         set_capability( "interface", 0 )
@@ -240,7 +233,7 @@ int vlclua_dir_list( vlc_object_t *p_this, const char *luadirname,
         i++;
     free( datadir );
 
-#if !(defined(__APPLE__) || defined(WIN32))
+#if !(defined(__APPLE__) || defined(WIN32) || defined(__OS2__))
     if( likely(asprintf( &ppsz_dir_list[i], "%s"DIR_SEP"lua"DIR_SEP"%s",
                          config_GetLibDir(), luadirname ) != -1) )
             i++;
@@ -507,6 +500,7 @@ int vlclua_playlist_add_internal( vlc_object_t *p_this, lua_State *L,
                 if( lua_isstring( L, -1 ) )
                 {
                     const char   *psz_path     = NULL;
+                    char         *psz_u8path   = NULL;
                     const char   *psz_name     = NULL;
                     char        **ppsz_options = NULL;
                     int           i_options    = 0;
@@ -527,7 +521,7 @@ int vlclua_playlist_add_internal( vlc_object_t *p_this, lua_State *L,
                     {
                         if( !lua_isnil( L, -1 ) )
                             msg_Warn( p_this, "Playlist item name should be a string." );
-                        psz_name = psz_path;
+                        psz_name = NULL;
                     }
 
                     /* Read duration */
@@ -581,6 +575,7 @@ int vlclua_playlist_add_internal( vlc_object_t *p_this, lua_State *L,
                     while( i_options > 0 )
                         free( ppsz_options[--i_options] );
                     free( ppsz_options );
+                    free( psz_u8path );
                 }
                 else
                 {