Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
720f8276
Commit
720f8276
authored
Nov 21, 2006
by
Rafaël Carré
Browse files
Unref D-Bus connections when not using them anymore
parent
05c276b0
Changes
4
Hide whitespace changes
Inline
Side-by-side
modules/control/dbus.c
View file @
720f8276
...
...
@@ -459,6 +459,8 @@ static void Close ( vlc_object_t *p_this )
PL_UNLOCK
;
pl_Release
(
p_playlist
);
dbus_connection_unref
(
p_intf
->
p_sys
->
p_conn
);
free
(
p_intf
->
p_sys
);
}
...
...
modules/misc/probe/hal.c
View file @
720f8276
...
...
@@ -32,6 +32,7 @@
*****************************************************************************/
struct
probe_sys_t
{
DBusConnection
*
p_connection
;
LibHalContext
*
p_ctx
;
int
i_devices
;
device_t
**
pp_devices
;
...
...
@@ -88,10 +89,12 @@ static int Open( vlc_object_t *p_this )
free
(
p_probe
->
p_sys
);
return
VLC_EGENERIC
;
}
p_sys
->
p_connection
=
p_connection
;
libhal_ctx_set_dbus_connection
(
p_probe
->
p_sys
->
p_ctx
,
p_connection
);
if
(
!
libhal_ctx_init
(
p_probe
->
p_sys
->
p_ctx
,
&
dbus_error
)
)
{
msg_Err
(
p_probe
,
"hal not available : %s"
,
dbus_error
.
message
);
dbus_connection_unref
(
p_connection
);
dbus_error_free
(
&
dbus_error
);
free
(
p_sys
);
return
VLC_EGENERIC
;
...
...
@@ -106,6 +109,7 @@ static void Close( vlc_object_t *p_this )
{
device_probe_t
*
p_probe
=
(
device_probe_t
*
)
p_this
;
probe_sys_t
*
p_sys
=
p_probe
->
p_sys
;
dbus_connection_unref
(
p_sys
->
p_connection
);
free
(
p_sys
);
}
...
...
modules/services_discovery/hal.c
View file @
720f8276
...
...
@@ -196,6 +196,8 @@ static void Close( vlc_object_t *p_this )
}
free
(
p_sys
);
#ifdef HAVE_HAL_1
dbus_connection_unref
(
p_sys
->
p_connection
);
struct
udi_input_id_t
*
p_udi_entry
;
while
(
p_sys
->
i_devices_number
>
0
)
...
...
src/libvlc-common.c
View file @
720f8276
...
...
@@ -1840,6 +1840,7 @@ static void InitDeviceValues( libvlc_int_t *p_vlc )
#ifdef HAVE_HAL_1
libhal_ctx_shutdown
(
ctx
,
NULL
);
dbus_connection_unref
(
p_connection
);
#else
hal_shutdown
(
ctx
);
#endif
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment