[pulseaudio-commits] r1283 - /trunk/src/pulsecore/pstream.c
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Fri Aug 18 18:16:39 PDT 2006
Author: lennart
Date: Sat Aug 19 03:16:38 2006
New Revision: 1283
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1283&root=pulseaudio&view=rev
Log:
allow importing of external shm data blocks unconditionally, even when local SHM support is disabled
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=1283&root=pulseaudio&r1=1282&r2=1283&view=diff
==============================================================================
--- trunk/src/pulsecore/pstream.c (original)
+++ trunk/src/pulsecore/pstream.c Sat Aug 19 03:16:38 2006
@@ -251,7 +251,9 @@
p->use_shm = 0;
p->export = NULL;
- p->import = NULL;
+
+ /* We do importing unconditionally */
+ p->import = pa_memimport_new(p->mempool, memimport_release_cb, p);
pa_iochannel_socket_set_rcvbuf(io, 1024*8);
pa_iochannel_socket_set_sndbuf(io, 1024*8);
@@ -567,7 +569,7 @@
flags = ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_FLAGS]);
- if (!p->use_shm && (flags & PA_FLAG_SHMMASK) != 0) {
+ if (!p->import && (flags & PA_FLAG_SHMMASK) != 0) {
pa_log_warn("Recieved SHM frame on a socket where SHM is disabled.");
return -1;
}
@@ -861,19 +863,11 @@
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