On Tue, 2014-02-04 at 19:03 -0300, jprvita at gmail.com wrote: > @@ -135,7 +166,24 @@ void hf_audio_agent_done(hf_audio_agent_data *data) { > > pa_assert(hfdata); > > + if (hfdata->hf_audio_cards) { > + pa_hashmap_free(hfdata->hf_audio_cards); > + hfdata->hf_audio_cards = NULL; > + } > + > if (hfdata->connection) { > + > + pa_dbus_remove_matches( > + pa_dbus_connection_get(hfdata->connection), > + "type='signal',sender='org.freedesktop.DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged'," > + "arg0='" OFONO_SERVICE "'", > + "type='signal',sender='" OFONO_SERVICE "',interface='" HF_AUDIO_MANAGER_INTERFACE "',member='CardAdded'", > + "type='signal',sender='" OFONO_SERVICE "',interface='" HF_AUDIO_MANAGER_INTERFACE "',member='CardRemoved'", > + NULL); Matches should be removed only if they have been successfully added. You need a matches_added flag in hf_audio_agent_data. -- Tanu