Hello Denis, Le 06/04/2012 19:38, Denis Kenzior a écrit : > Hi Frédéric, > >> @@ -82,6 +93,12 @@ static DBusMessage *hfp_ag_agent_new_connection(DBusConnection *conn, >> return __ofono_error_failed(msg); >> >> ofono_emulator_register(em, fd); >> + audio = bluetooth_set_audio_management(em, path, features); >> + >> + io = g_io_channel_unix_new(fd); >> + g_io_add_watch_full(io, G_PRIORITY_HIGH, >> + G_IO_HUP | G_IO_ERR | G_IO_NVAL, client_event, >> + audio, NULL); > > It might be better to register to atom removal rather than an IO watch. As modem can have multiple emulator atoms (in case of connection to multiple headsets), I do not think that registering for atom removal using __ofono_modem_add_atom_watch() will be OK. I may add an API to emulator to register a disconnection callback: ofono_emulator_set_disconnect_cb(em, cb, cb_data) This keep separation between oFono core and HFP AG plug-in. Regards Fred -- Frederic Danis Open Source Technology Center frederic.danis(a)intel.com Intel Corporation