[pulseaudio-discuss] [PATCH] srbchannel: Defer reading when setting up read callback

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Thu Sep 18 03:03:19 PDT 2014


On Wed, 2014-09-17 at 09:06 +0200, David Henningsson wrote:
> Calling the callback while setting it up can make things
> complicated for clients, as the callback can do arbitrarily
> things.
> 
> In this case, a protocol error caused the srbchannel to be
> owned by both the pstream and the native connection.
> 
> Now the read callback is deferred, making sure the callback
> is called from a cleaner context where errors are handled
> appropriately.
> 
> Reported-by: Tanu Kaskinen <tanu.kaskinen at linux.intel.com>
> Signed-off-by: David Henningsson <david.henningsson at canonical.com>
> ---
>  src/pulsecore/srbchannel.c | 22 +++++++++++++++++++---
>  src/pulsecore/srbchannel.h |  3 ---
>  2 files changed, 19 insertions(+), 6 deletions(-)
> 
> Hi Tanu, can you check that this patch resolves your problem,
> as it seems to require your "unfinished code" to replicate?

I now tested this, and yes, this resolves my problem.

-- 
Tanu



More information about the pulseaudio-discuss mailing list