Ejemplo n.º 1
0
static void bluetooth_exit(void)
{
	g_dbus_remove_watch(connection, watch);
	g_dbus_remove_watch(connection, added_watch);
	g_dbus_remove_watch(connection, removed_watch);
	g_dbus_remove_watch(connection, adapter_watch);
	g_dbus_remove_watch(connection, device_removed_watch);
	g_dbus_remove_watch(connection, device_watch);
	g_dbus_remove_watch(connection, network_watch);

	/*
	 * We unset the disabling of the Bluetooth device when shutting down
	 * so that non-PAN BT connections are not affected.
	 */
	bluetooth_driver.disable = NULL;

	bluetooth_disconnect(connection, NULL);

	connman_technology_driver_unregister(&tech_driver);

	connman_device_driver_unregister(&bluetooth_driver);
	connman_network_driver_unregister(&pan_driver);

	dbus_connection_unref(connection);
}
Ejemplo n.º 2
0
static void bluetooth_exit(void)
{
	g_dbus_remove_watch(connection, watch);
	g_dbus_remove_watch(connection, added_watch);
	g_dbus_remove_watch(connection, removed_watch);
	g_dbus_remove_watch(connection, adapter_watch);
	g_dbus_remove_watch(connection, device_removed_watch);
	g_dbus_remove_watch(connection, device_watch);
	g_dbus_remove_watch(connection, network_watch);

	bluetooth_disconnect(connection, NULL);

	connman_technology_driver_unregister(&tech_driver);

	connman_device_driver_unregister(&bluetooth_driver);
	connman_network_driver_unregister(&pan_driver);

	dbus_connection_unref(connection);
}