+
+ } else if (dbus_message_is_signal(message, "org.pulseaudio.Server", "DirtyGiveUpMessage")) {
+ /* We use this message to avoid a dirty race condition when we
+ get an ACLAdded message before the previously owning PA
+ sever has closed the device. We can remove this as
+ soon as HAL learns frevoke() */
+
+ struct device *d;
+ const char *udi;
+
+ udi = dbus_message_get_path(message);
+
+ if ((d = pa_hashmap_get(u->devices, udi))) {
+
+ if (d->acl_race_fix) {
+ d->acl_race_fix = FALSE;
+ pa_log_debug("Got dirty give up message for '%s', trying resume ...", udi);
+
+ if (d->sink_name) {
+ pa_sink *sink;
+
+ if ((sink = pa_namereg_get(u->core, d->sink_name, PA_NAMEREG_SINK)))
+ pa_sink_suspend(sink, FALSE, PA_SUSPEND_SESSION);
+ }
+
+ if (d->source_name) {
+ pa_source *source;
+
+ if ((source = pa_namereg_get(u->core, d->source_name, PA_NAMEREG_SOURCE)))
+ pa_source_suspend(source, FALSE, PA_SUSPEND_SESSION);
+ }
+
+ if (d->card_name) {
+ pa_card *card;
+
+ if ((card = pa_namereg_get(u->core, d->source_name, PA_NAMEREG_CARD)))
+ pa_card_suspend(card, FALSE, PA_SUSPEND_SESSION);
+ }
+ }
+
+ } else
+ /* Yes, we don't check the UDI for validity, but hopefully HAL will */
+ device_added_cb(u->context, udi);
+