Commit ff79bc85 authored by Rafaël Carré's avatar Rafaël Carré

Don't run hal_initialize() twice. Bug introduced in [19692].

parent f449bc75
...@@ -1880,12 +1880,11 @@ static void InitDeviceValues( libvlc_int_t *p_vlc ) ...@@ -1880,12 +1880,11 @@ static void InitDeviceValues( libvlc_int_t *p_vlc )
char **devices = NULL; char **devices = NULL;
char *block_dev = NULL; char *block_dev = NULL;
dbus_bool_t b_dvd; dbus_bool_t b_dvd;
#ifdef HAVE_HAL_1 #ifdef HAVE_HAL_1
DBusConnection *p_connection = NULL; DBusConnection *p_connection = NULL;
DBusError error; DBusError error;
#endif
#ifdef HAVE_HAL_1
ctx = libhal_ctx_new(); ctx = libhal_ctx_new();
if( !ctx ) return; if( !ctx ) return;
dbus_error_init( &error ); dbus_error_init( &error );
...@@ -1896,17 +1895,13 @@ static void InitDeviceValues( libvlc_int_t *p_vlc ) ...@@ -1896,17 +1895,13 @@ static void InitDeviceValues( libvlc_int_t *p_vlc )
dbus_error_free( &error ); dbus_error_free( &error );
return; return;
} }
#else
ctx = hal_initialize( NULL, FALSE );
if( !ctx ) return;
#endif
#ifdef HAVE_HAL_1
libhal_ctx_set_dbus_connection( ctx, p_connection ); libhal_ctx_set_dbus_connection( ctx, p_connection );
if( libhal_ctx_init( ctx, &error ) ) if( libhal_ctx_init( ctx, &error ) )
#else #else
if( ( ctx = hal_initialize( NULL, FALSE ) ) ) ctx = hal_initialize( NULL, FALSE );
if( ctx )
#endif #endif
{ {
#ifdef HAVE_HAL_1 #ifdef HAVE_HAL_1
if( ( devices = libhal_get_all_devices( ctx, &i_devices, NULL ) ) ) if( ( devices = libhal_get_all_devices( ctx, &i_devices, NULL ) ) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment