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

Should fix API compatibility with HAL 0.5.0

parent 952d3486
...@@ -61,6 +61,7 @@ struct services_discovery_sys_t ...@@ -61,6 +61,7 @@ struct services_discovery_sys_t
playlist_item_t *p_node_cat; playlist_item_t *p_node_cat;
playlist_item_t *p_node_one; playlist_item_t *p_node_one;
#ifdef HAVE_HAL_1 #ifdef HAVE_HAL_1
DBusConnection *p_connection
int i_devices_number; int i_devices_number;
struct udi_input_id_t **pp_devices; struct udi_input_id_t **pp_devices;
#endif #endif
...@@ -134,6 +135,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -134,6 +135,7 @@ static int Open( vlc_object_t *p_this )
return VLC_EGENERIC; return VLC_EGENERIC;
} }
libhal_ctx_set_dbus_connection( p_sys->p_ctx, p_connection ); libhal_ctx_set_dbus_connection( p_sys->p_ctx, p_connection );
p_sys->p_connection = p_connection;
if( !libhal_ctx_init( p_sys->p_ctx, &dbus_error ) ) if( !libhal_ctx_init( p_sys->p_ctx, &dbus_error ) )
#else #else
if( !(p_sys->p_ctx = hal_initialize( NULL, FALSE ) ) ) if( !(p_sys->p_ctx = hal_initialize( NULL, FALSE ) ) )
...@@ -407,8 +409,8 @@ static void Run( services_discovery_t *p_sd ) ...@@ -407,8 +409,8 @@ static void Run( services_discovery_t *p_sd )
while( !p_sd->b_die ) while( !p_sd->b_die )
{ {
/* look for events on the bus, blocking 1 second */ /* look for events on the bus, blocking 1 second */
dbus_connection_read_write_dispatch( dbus_connection_read_write_dispatch( p_sys->p_connection, 1000 );
libhal_ctx_get_dbus_connection(p_sys->p_ctx), 1000 ); /* HAL 0.5.8.1 can use libhal_ctx_get_dbus_connection(p_sys->p_ctx) */
} }
#endif #endif
......
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