core-subscribe: add PA_SUBSCRIPTION_EVENT_CARD in dump_event
authorLibin Yang <libin.yang@intel.com>
Mon, 8 Jun 2020 14:34:44 +0000 (10:34 -0400)
committerTanu Kaskinen <tanuk@iki.fi>
Wed, 10 Jun 2020 09:11:06 +0000 (09:11 +0000)
fac_table[] lacks of PA_SUBSCRIPTION_EVENT_CARD item. This will cause
pulseaudio crash when it tries to dump the PA_SUBSCRIPTION_EVENT_CARD
event when DEBUG is defined.

Signed-off-by: Libin Yang <libin.yang@intel.com>
src/pulsecore/core-subscribe.c

index 61c779b66eb69ac16c6d6910fa2dbdf74242bdf3..8c91059f662ec73dddb0971d80709abe32ea1454 100644 (file)
@@ -133,7 +133,8 @@ static void dump_event(const char * prefix, pa_subscription_event*e) {
         [PA_SUBSCRIPTION_EVENT_CLIENT] = "CLIENT",
         [PA_SUBSCRIPTION_EVENT_SAMPLE_CACHE] = "SAMPLE_CACHE",
         [PA_SUBSCRIPTION_EVENT_SERVER] = "SERVER",
-        [PA_SUBSCRIPTION_EVENT_AUTOLOAD] = "AUTOLOAD"
+        [PA_SUBSCRIPTION_EVENT_AUTOLOAD] = "AUTOLOAD",
+        [PA_SUBSCRIPTION_EVENT_CARD] = "CARD"
     };
 
     const char * const type_table[] = {