From cd0c2c45c0198ec38cce4af877b033529639ddaa Mon Sep 17 00:00:00 2001 From: Ilkka Ollakka Date: Fri, 9 Jul 2010 11:49:48 +0300 Subject: [PATCH] apply Enable/DisableObjectPrinting to filter subscriptions too --- src/misc/messages.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/misc/messages.c b/src/misc/messages.c index b2f5c98b1f..8df893ffd6 100644 --- a/src/misc/messages.c +++ b/src/misc/messages.c @@ -442,6 +442,20 @@ void msg_GenericVa (vlc_object_t *p_this, int i_type, for (int i = 0; i < bank->i_sub; i++) { msg_subscription_t *sub = bank->pp_sub[i]; + libvlc_priv_t *priv = libvlc_priv( sub->instance ); + msg_bank_t *bank = priv->msg_bank; + void *val = vlc_dictionary_value_for_key( &bank->enabled_objects, + p_item->psz_module ); + if( val == kObjectPrintingDisabled ) continue; + if( val != kObjectPrintingEnabled ) /*if not allowed */ + { + val = vlc_dictionary_value_for_key( &bank->enabled_objects, + p_item->psz_object_type ); + if( val == kObjectPrintingDisabled ) continue; + if( val == kObjectPrintingEnabled ); /* Allowed */ + else if( !bank->all_objects_enabled ) continue; + } + sub->func (sub->opaque, p_item, 0); } vlc_rwlock_unlock (&bank->lock); -- 2.39.5