[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, stable-queue, updated. v0.9.21-7-g78811c5
Lennart Poettering
gitmailer-noreply at 0pointer.de
Mon Jan 11 18:04:47 PST 2010
This is an automated email from the git hooks/post-receive script. It was
generated because of a push to the "PulseAudio Sound Server" repository.
The stable-queue branch has been updated
from e7d9f891e2a8e6b670098b80315ca1f0010c35ca (commit)
- Log -----------------------------------------------------------------
78811c5 client: verify connection state in pa_stream_connect_upload()
bf50dc4 client: detect forking in sample cache API, too
-----------------------------------------------------------------------
Summary of changes:
src/pulse/scache.c | 10 ++++++++--
src/pulse/stream.c | 1 +
2 files changed, 9 insertions(+), 2 deletions(-)
-----------------------------------------------------------------------
commit bf50dc42306857e361267d2ad39b737ad05b8604
Author: Lennart Poettering <lennart at poettering.net>
Date: Tue Jan 12 03:01:14 2010 +0100
client: detect forking in sample cache API, too
diff --git a/src/pulse/scache.c b/src/pulse/scache.c
index 27da688..2a7602f 100644
--- a/src/pulse/scache.c
+++ b/src/pulse/scache.c
@@ -28,15 +28,15 @@
#include <string.h>
#include <pulse/utf8.h>
+#include <pulse/scache.h>
#include <pulsecore/pstream-util.h>
#include <pulsecore/macro.h>
#include <pulsecore/proplist-util.h>
+#include "fork-detect.h"
#include "internal.h"
-#include "scache.h"
-
int pa_stream_connect_upload(pa_stream *s, size_t length) {
pa_tagstruct *t;
uint32_t tag;
@@ -45,6 +45,7 @@ int pa_stream_connect_upload(pa_stream *s, size_t length) {
pa_assert(s);
pa_assert(PA_REFCNT_VALUE(s) >= 1);
+ PA_CHECK_VALIDITY(s->context, !pa_detect_fork(), PA_ERR_FORKED);
PA_CHECK_VALIDITY(s->context, s->state == PA_STREAM_UNCONNECTED, PA_ERR_BADSTATE);
PA_CHECK_VALIDITY(s->context, length > 0, PA_ERR_INVALID);
PA_CHECK_VALIDITY(s->context, length == (size_t) (uint32_t) length, PA_ERR_INVALID);
@@ -85,6 +86,7 @@ int pa_stream_finish_upload(pa_stream *s) {
pa_assert(s);
pa_assert(PA_REFCNT_VALUE(s) >= 1);
+ PA_CHECK_VALIDITY(s->context, !pa_detect_fork(), PA_ERR_FORKED);
PA_CHECK_VALIDITY(s->context, s->channel_valid, PA_ERR_BADSTATE);
PA_CHECK_VALIDITY(s->context, s->context->state == PA_CONTEXT_READY, PA_ERR_BADSTATE);
@@ -174,6 +176,7 @@ pa_operation *pa_context_play_sample(pa_context *c, const char *name, const char
pa_assert(c);
pa_assert(PA_REFCNT_VALUE(c) >= 1);
+ PA_CHECK_VALIDITY_RETURN_NULL(c, !pa_detect_fork(), PA_ERR_FORKED);
PA_CHECK_VALIDITY_RETURN_NULL(c, c->state == PA_CONTEXT_READY, PA_ERR_BADSTATE);
PA_CHECK_VALIDITY_RETURN_NULL(c, name && *name, PA_ERR_INVALID);
PA_CHECK_VALIDITY_RETURN_NULL(c, !dev || *dev, PA_ERR_INVALID);
@@ -213,6 +216,7 @@ pa_operation *pa_context_play_sample_with_proplist(pa_context *c, const char *na
pa_assert(c);
pa_assert(PA_REFCNT_VALUE(c) >= 1);
+ PA_CHECK_VALIDITY_RETURN_NULL(c, !pa_detect_fork(), PA_ERR_FORKED);
PA_CHECK_VALIDITY_RETURN_NULL(c, c->state == PA_CONTEXT_READY, PA_ERR_BADSTATE);
PA_CHECK_VALIDITY_RETURN_NULL(c, name && *name, PA_ERR_INVALID);
PA_CHECK_VALIDITY_RETURN_NULL(c, !dev || *dev, PA_ERR_INVALID);
@@ -255,6 +259,7 @@ pa_operation* pa_context_remove_sample(pa_context *c, const char *name, pa_conte
pa_assert(c);
pa_assert(PA_REFCNT_VALUE(c) >= 1);
+ PA_CHECK_VALIDITY_RETURN_NULL(c, !pa_detect_fork(), PA_ERR_FORKED);
PA_CHECK_VALIDITY_RETURN_NULL(c, c->state == PA_CONTEXT_READY, PA_ERR_BADSTATE);
PA_CHECK_VALIDITY_RETURN_NULL(c, name && *name, PA_ERR_INVALID);
diff --git a/src/pulse/stream.c b/src/pulse/stream.c
index 793277a..79b2868 100644
--- a/src/pulse/stream.c
+++ b/src/pulse/stream.c
@@ -29,6 +29,7 @@
#include <string.h>
#include <pulse/def.h>
+#include <pulse/stream.h>
#include <pulse/timeval.h>
#include <pulse/rtclock.h>
#include <pulse/xmalloc.h>
commit 78811c5653d0ba508b6558ba4578b61da26c60cf
Author: Lennart Poettering <lennart at poettering.net>
Date: Tue Jan 12 03:01:27 2010 +0100
client: verify connection state in pa_stream_connect_upload()
Make suer we check the connection state before going on, so that we can
rely that s->context->pstream is properly initialized.
https://bugzilla.redhat.com/show_bug.cgi?id=539500
diff --git a/src/pulse/scache.c b/src/pulse/scache.c
index 2a7602f..b2169b6 100644
--- a/src/pulse/scache.c
+++ b/src/pulse/scache.c
@@ -49,6 +49,7 @@ int pa_stream_connect_upload(pa_stream *s, size_t length) {
PA_CHECK_VALIDITY(s->context, s->state == PA_STREAM_UNCONNECTED, PA_ERR_BADSTATE);
PA_CHECK_VALIDITY(s->context, length > 0, PA_ERR_INVALID);
PA_CHECK_VALIDITY(s->context, length == (size_t) (uint32_t) length, PA_ERR_INVALID);
+ PA_CHECK_VALIDITY(s->context, s->context->state == PA_CONTEXT_READY, PA_ERR_BADSTATE);
if (!(name = pa_proplist_gets(s->proplist, PA_PROP_EVENT_ID)))
name = pa_proplist_gets(s->proplist, PA_PROP_MEDIA_NAME);
--
hooks/post-receive
PulseAudio Sound Server
More information about the pulseaudio-commits
mailing list