When given a backtrace such as this:
https://launchpadlibrarian.net/79380464/ThreadStacktrace.txt
Do you think the attached patch is the right way to solve the problem
(if so, please commit the attached patch), or at least a reasonable
workaround that we can distro patch for the time being to avoid
PulseAudio crashing?
--
David Henningsson, Canonical Ltd.
http://launchpad.net/~diwic
>From 243f7bf38fe49ff65150d0e90c2f28f89f32bb13 Mon Sep 17 00:00:00 2001
From: David Henningsson <[email protected]>
Date: Mon, 12 Sep 2011 11:23:57 +0200
Subject: [PATCH] RAOP: Don't crash if fd is not open when trying to close it
BugLink: http://bugs.launchpad.net/bugs/845286
Signed-off-by: David Henningsson <[email protected]>
---
src/modules/raop/module-raop-sink.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/modules/raop/module-raop-sink.c b/src/modules/raop/module-raop-sink.c
index 422f05c..1fc6d09 100644
--- a/src/modules/raop/module-raop-sink.c
+++ b/src/modules/raop/module-raop-sink.c
@@ -235,10 +235,10 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
}
case SINK_MESSAGE_RIP_SOCKET: {
- pa_assert(u->fd >= 0);
-
- pa_close(u->fd);
- u->fd = -1;
+ if (u->fd >= 0) {
+ pa_close(u->fd);
+ u->fd = -1;
+ }
if (u->sink->thread_info.state == PA_SINK_SUSPENDED) {
--
1.7.5.4
_______________________________________________
pulseaudio-discuss mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss