summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2011-11-02 14:42:40 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2011-11-02 14:42:40 +0000
commitd52b09a43f6fe1efd48555de4b97cfb66d465732 (patch)
tree45286c0c519cafe2e5331d922875161066286530
parentd091a231833a192000bcc59fcf042c2ba78c1565 (diff)
sync with e again
SVN revision: 64649
-rw-r--r--pa.h1
-rw-r--r--sink.c20
2 files changed, 13 insertions, 8 deletions
diff --git a/pa.h b/pa.h
index 5f726fd..c656b0a 100644
--- a/pa.h
+++ b/pa.h
@@ -459,6 +459,7 @@ struct Pulse_Sink {
459 Eina_Bool mute : 1; /**< Mute switch of the sink */ 459 Eina_Bool mute : 1; /**< Mute switch of the sink */
460 Eina_Bool update : 1; 460 Eina_Bool update : 1;
461 Eina_Bool source : 1; /**< sink is actually a source */ 461 Eina_Bool source : 1; /**< sink is actually a source */
462 Eina_Bool deleted : 1; /**< sink has been deleted */
462}; 463};
463 464
464typedef uint32_t pa_pstream_descriptor[PA_PSTREAM_DESCRIPTOR_MAX]; 465typedef uint32_t pa_pstream_descriptor[PA_PSTREAM_DESCRIPTOR_MAX];
diff --git a/sink.c b/sink.c
index b357110..18cf2cd 100644
--- a/sink.c
+++ b/sink.c
@@ -164,15 +164,19 @@ pulse_sink_free(Pulse_Sink *sink)
164{ 164{
165 Pulse_Sink_Port_Info *pi; 165 Pulse_Sink_Port_Info *pi;
166 if (!sink) return; 166 if (!sink) return;
167 if (sink->source) 167 if (!sink->deleted)
168 { 168 {
169 if (eina_hash_del_by_key(pulse_sources, (uintptr_t*)&sink->index)) 169 sink->deleted = EINA_TRUE;
170 return; 170 if (sink->source)
171 } 171 {
172 else 172 eina_hash_del_by_key(pulse_sources, (uintptr_t*)&sink->index);
173 { 173 return;
174 if (eina_hash_del_by_key(pulse_sinks, (uintptr_t*)&sink->index)) 174 }
175 return; 175 else
176 {
177 eina_hash_del_by_key(pulse_sinks, (uintptr_t*)&sink->index);
178 return;
179 }
176 } 180 }
177 eina_stringshare_del(sink->name); 181 eina_stringshare_del(sink->name);
178 eina_stringshare_del(sink->description); 182 eina_stringshare_del(sink->description);