From 0547b0fd4a9a8df1f7c6836a6e1e04697769d4b8 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 12 Aug 2006 15:08:53 +0000 Subject: there's no need to queue subscription events if noone is listening, hence don't do it! git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1218 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/pulsecore/core-subscribe.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/pulsecore') diff --git a/src/pulsecore/core-subscribe.c b/src/pulsecore/core-subscribe.c index 2c625632..37673da5 100644 --- a/src/pulsecore/core-subscribe.c +++ b/src/pulsecore/core-subscribe.c @@ -209,6 +209,10 @@ void pa_subscription_post(pa_core *c, pa_subscription_event_type_t t, uint32_t i pa_subscription_event *e; assert(c); + /* No need for queuing subscriptions of noone is listening */ + if (!c->subscriptions) + return; + if ((t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) != PA_SUBSCRIPTION_EVENT_NEW) { pa_subscription_event *i, *n; -- cgit