[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v1.0-dev-264-g575ba65
Lennart Poettering
gitmailer-noreply at 0pointer.de
Thu Apr 21 12:05:47 PDT 2011
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 master branch has been updated
from e5f547fe705c4e51cb09d72c2e1682d345c8f3e4 (commit)
- Log -----------------------------------------------------------------
575ba65 memblockq: decode unset chunks as NULL chunks again
-----------------------------------------------------------------------
Summary of changes:
src/pulsecore/asyncmsgq.c | 2 +-
src/pulsecore/memchunk.c | 9 +++++++++
src/pulsecore/memchunk.h | 3 +++
3 files changed, 13 insertions(+), 1 deletions(-)
-----------------------------------------------------------------------
commit 575ba65714ab85d81b0e520f348d78c2ae80a6f9
Author: Lennart Poettering <lennart at poettering.net>
Date: Thu Apr 21 21:05:51 2011 +0200
memblockq: decode unset chunks as NULL chunks again
This fixes asserts beeing hit when see requests are posted via the
native protocol.
diff --git a/src/pulsecore/asyncmsgq.c b/src/pulsecore/asyncmsgq.c
index b0804f7..c211d9b 100644
--- a/src/pulsecore/asyncmsgq.c
+++ b/src/pulsecore/asyncmsgq.c
@@ -321,7 +321,7 @@ void pa_asyncmsgq_write_after_poll(pa_asyncmsgq *a) {
int pa_asyncmsgq_dispatch(pa_msgobject *object, int code, void *userdata, int64_t offset, pa_memchunk *memchunk) {
if (object)
- return object->process_msg(object, code, userdata, offset, memchunk);
+ return object->process_msg(object, code, userdata, offset, pa_memchunk_isset(memchunk) ? memchunk : NULL);
return 0;
}
diff --git a/src/pulsecore/memchunk.c b/src/pulsecore/memchunk.c
index 0bbf859..34317fe 100644
--- a/src/pulsecore/memchunk.c
+++ b/src/pulsecore/memchunk.c
@@ -110,3 +110,12 @@ pa_memchunk* pa_memchunk_memcpy(pa_memchunk *dst, pa_memchunk *src) {
return dst;
}
+
+pa_bool_t pa_memchunk_isset(pa_memchunk *chunk) {
+ assert(chunk);
+
+ return
+ chunk->memblock ||
+ chunk->index > 0 ||
+ chunk->length > 0;
+}
diff --git a/src/pulsecore/memchunk.h b/src/pulsecore/memchunk.h
index 9458f4f..d7d8240 100644
--- a/src/pulsecore/memchunk.h
+++ b/src/pulsecore/memchunk.h
@@ -50,4 +50,7 @@ pa_memchunk *pa_memchunk_will_need(const pa_memchunk *c);
/* Copy the data in the src memchunk to the dst memchunk */
pa_memchunk* pa_memchunk_memcpy(pa_memchunk *dst, pa_memchunk *src);
+/* Return TRUE if any field is set != 0 */
+pa_bool_t pa_memchunk_isset(pa_memchunk *c);
+
#endif
--
hooks/post-receive
PulseAudio Sound Server
More information about the pulseaudio-commits
mailing list