[pulseaudio-commits] r1275 - /trunk/src/pulsecore/pstream.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Fri Aug 18 16:42:15 PDT 2006


Author: lennart
Date: Sat Aug 19 01:42:14 2006
New Revision: 1275

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1275&root=pulseaudio&view=rev
Log:
remove export/import objects when SHM is disable for a pa_pstream object

Modified:
    trunk/src/pulsecore/pstream.c

Modified: trunk/src/pulsecore/pstream.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulsecore/pstream.c?rev=1275&root=pulseaudio&r1=1274&r2=1275&view=diff
==============================================================================
--- trunk/src/pulsecore/pstream.c (original)
+++ trunk/src/pulsecore/pstream.c Sat Aug 19 01:42:14 2006
@@ -476,7 +476,6 @@
 #ifdef HAVE_CREDS
     if ((p->send_creds_now = p->write.current->with_creds))
         p->write_creds = p->write.current->creds;
-    
 #endif
 }
 
@@ -860,9 +859,25 @@
 
     p->use_shm = enable;
 
-    if (!p->import)
-        p->import = pa_memimport_new(p->mempool, memimport_release_cb, p);
-
-    if (!p->export)
-        p->export = pa_memexport_new(p->mempool, memexport_revoke_cb, p);
-}
+    if (enable) {
+    
+        if (!p->import)
+            p->import = pa_memimport_new(p->mempool, memimport_release_cb, p);
+        
+        if (!p->export)
+            p->export = pa_memexport_new(p->mempool, memexport_revoke_cb, p);
+
+    } else {
+
+        if (p->import) {
+            pa_memimport_free(p->import);
+            p->import = NULL;
+        }
+        
+        if (p->export) {
+            pa_memexport_free(p->export);
+            p->export = NULL;
+        }
+        
+    }
+}




More information about the pulseaudio-commits mailing list