summaryrefslogtreecommitdiffstats
path: root/src/polyp
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2006-04-10 20:38:58 +0000
committerLennart Poettering <lennart@poettering.net>2006-04-10 20:38:58 +0000
commita81209f147c5aa701efda0c911229a0fd6948fc9 (patch)
treec5b694d3ff4aaa6a7a3d53d18fc2ebfa3ab5b932 /src/polyp
parent09589a75a466e019a2d7dca99f6cae4a3d598e55 (diff)
validity checks for pa_context_is_pending()
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@679 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/polyp')
-rw-r--r--src/polyp/context.c5
-rw-r--r--src/polyp/stream.c2
2 files changed, 2 insertions, 5 deletions
diff --git a/src/polyp/context.c b/src/polyp/context.c
index 845e88d9..6fe008ea 100644
--- a/src/polyp/context.c
+++ b/src/polyp/context.c
@@ -728,9 +728,8 @@ int pa_context_is_pending(pa_context *c) {
assert(c);
assert(c->ref >= 1);
-/* pa_log("pstream: %i", pa_pstream_is_pending(c->pstream)); */
-/* pa_log("pdispatch: %i", pa_pdispatch_is_pending(c->pdispatch)); */
-
+ PA_CHECK_VALIDITY_RETURN_ANY(c, c->state == PA_CONTEXT_READY, PA_ERR_BADSTATE, -1);
+
return (c->pstream && pa_pstream_is_pending(c->pstream)) ||
(c->pdispatch && pa_pdispatch_is_pending(c->pdispatch)) ||
c->client;
diff --git a/src/polyp/stream.c b/src/polyp/stream.c
index 0fcc36b7..ca107750 100644
--- a/src/polyp/stream.c
+++ b/src/polyp/stream.c
@@ -1235,5 +1235,3 @@ const pa_channel_map* pa_stream_get_channel_map(pa_stream *s) {
return &s->channel_map;
}
-
-