[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.12-102-g9f5d052
Lennart Poettering
gitmailer-noreply at 0pointer.de
Wed Oct 1 15:04:38 PDT 2008
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 ea15ca98624ad308b68905bdb89b501b27fea81e (commit)
- Log -----------------------------------------------------------------
9f5d052... make simple protocol not crash when allocating a memory block
cf3f80e... when killing gconf helper, loop over EINTR
-----------------------------------------------------------------------
Summary of changes:
src/modules/gconf/module-gconf.c | 12 ++++++++++--
src/pulsecore/protocol-simple.c | 12 ++++++++----
2 files changed, 18 insertions(+), 6 deletions(-)
-----------------------------------------------------------------------
commit cf3f80e8b41574a6f4c5def3537273356425b874
Author: Lennart Poettering <lennart at poettering.net>
Date: Wed Oct 1 23:42:32 2008 +0200
when killing gconf helper, loop over EINTR
diff --git a/src/modules/gconf/module-gconf.c b/src/modules/gconf/module-gconf.c
index 6e8ab6e..845ede5 100644
--- a/src/modules/gconf/module-gconf.c
+++ b/src/modules/gconf/module-gconf.c
@@ -378,7 +378,16 @@ void pa__done(pa_module*m) {
if (u->pid != (pid_t) -1) {
kill(u->pid, SIGTERM);
- waitpid(u->pid, NULL, 0);
+
+ for (;;) {
+ if (waitpid(u->pid, NULL, 0) >= 0)
+ break;
+
+ if (errno != EINTR) {
+ pa_log("waitpid() failed: %s", pa_cstrerror(errno));
+ break;
+ }
+ }
}
if (u->io_event)
@@ -387,7 +396,6 @@ void pa__done(pa_module*m) {
if (u->fd >= 0)
pa_close(u->fd);
-
if (u->module_infos)
pa_hashmap_free(u->module_infos, module_info_free, u);
commit 9f5d052d93a85bb8e4376732fe4473e87bf264f5
Author: Lennart Poettering <lennart at poettering.net>
Date: Thu Oct 2 00:04:02 2008 +0200
make simple protocol not crash when allocating a memory block
diff --git a/src/pulsecore/protocol-simple.c b/src/pulsecore/protocol-simple.c
index 65e6773..743bf2e 100644
--- a/src/pulsecore/protocol-simple.c
+++ b/src/pulsecore/protocol-simple.c
@@ -173,7 +173,7 @@ static int do_read(connection *c) {
}
if (!c->playback.current_memblock) {
- pa_assert_se(c->playback.current_memblock = pa_memblock_new(c->protocol->core->mempool, 0));
+ pa_assert_se(c->playback.current_memblock = pa_memblock_new(c->protocol->core->mempool, (size_t) -1));
c->playback.memblock_index = 0;
space = pa_memblock_get_length(c->playback.current_memblock);
@@ -492,6 +492,8 @@ void pa_simple_protocol_connect(pa_simple_protocol *p, pa_iochannel *io, pa_simp
c->parent.parent.free = connection_free;
c->parent.process_msg = connection_process_msg;
c->io = io;
+ pa_iochannel_set_callback(c->io, io_callback, c);
+
c->sink_input = NULL;
c->source_output = NULL;
c->input_memblockq = c->output_memblockq = NULL;
@@ -610,7 +612,6 @@ void pa_simple_protocol_connect(pa_simple_protocol *p, pa_iochannel *io, pa_simp
pa_source_output_put(c->source_output);
}
- pa_iochannel_set_callback(c->io, io_callback, c);
pa_idxset_put(p->connections, c, NULL);
return;
@@ -689,6 +690,9 @@ pa_simple_options* pa_simple_options_new(void) {
o = pa_xnew0(pa_simple_options, 1);
PA_REFCNT_INIT(o);
+ o->record = FALSE;
+ o->playback = TRUE;
+
return o;
}
@@ -733,14 +737,14 @@ int pa_simple_options_parse(pa_simple_options *o, pa_core *c, pa_modargs *ma) {
pa_xfree(o->default_sink);
o->default_sink = pa_xstrdup(pa_modargs_get_value(ma, "sink", NULL));
- enabled = FALSE;
+ enabled = o->record;
if (pa_modargs_get_value_boolean(ma, "record", &enabled) < 0) {
pa_log("record= expects a boolean argument.");
return -1;
}
o->record = enabled;
- enabled = TRUE;
+ enabled = o->playback;
if (pa_modargs_get_value_boolean(ma, "playback", &enabled) < 0) {
pa_log("playback= expects a boolean argument.");
return -1;
--
hooks/post-receive
PulseAudio Sound Server
More information about the pulseaudio-commits
mailing list