Antonio Larrosa
a1ca724012
- Add two patches from upstream: * 0012-device-activation-show-device-name-in-logs.patch * 0013-scripts-fallback-to-empty-config-table-if-args-were-.patch OBS-URL: https://build.opensuse.org/request/show/948987 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/wireplumber?expand=0&rev=27
140 lines
4.4 KiB
Diff
140 lines
4.4 KiB
Diff
From 18bc3d3596a1fac8ab21361160ac4e9c6ec37c89 Mon Sep 17 00:00:00 2001
|
|
From: George Kiagiadakis <george.kiagiadakis@collabora.com>
|
|
Date: Thu, 13 Jan 2022 11:08:34 +0200
|
|
Subject: [PATCH 13/14] scripts: fallback to empty config table if args were
|
|
not passed from the config files
|
|
|
|
Fixes #158
|
|
---
|
|
src/scripts/access/access-default.lua | 2 +-
|
|
src/scripts/create-item.lua | 2 +-
|
|
src/scripts/default-routes.lua | 2 +-
|
|
src/scripts/monitors/alsa-midi.lua | 2 +-
|
|
src/scripts/monitors/alsa.lua | 2 +-
|
|
src/scripts/policy-endpoint-client-links.lua | 2 +-
|
|
src/scripts/policy-endpoint-client.lua | 2 +-
|
|
src/scripts/policy-endpoint-device.lua | 2 +-
|
|
src/scripts/policy-node.lua | 2 +-
|
|
9 files changed, 9 insertions(+), 9 deletions(-)
|
|
|
|
diff --git a/src/scripts/access/access-default.lua b/src/scripts/access/access-default.lua
|
|
index 3c27e90..0fac87b 100644
|
|
--- a/src/scripts/access/access-default.lua
|
|
+++ b/src/scripts/access/access-default.lua
|
|
@@ -5,7 +5,7 @@
|
|
--
|
|
-- SPDX-License-Identifier: MIT
|
|
|
|
-local config = ...
|
|
+local config = ... or {}
|
|
|
|
-- preprocess rules and create Interest objects
|
|
for _, r in ipairs(config.rules or {}) do
|
|
diff --git a/src/scripts/create-item.lua b/src/scripts/create-item.lua
|
|
index ad4a6f6..f2c7562 100644
|
|
--- a/src/scripts/create-item.lua
|
|
+++ b/src/scripts/create-item.lua
|
|
@@ -6,7 +6,7 @@
|
|
-- SPDX-License-Identifier: MIT
|
|
|
|
-- Receive script arguments from config.lua
|
|
-local config = ...
|
|
+local config = ... or {}
|
|
|
|
items = {}
|
|
|
|
diff --git a/src/scripts/default-routes.lua b/src/scripts/default-routes.lua
|
|
index 953cba3..075f5d6 100644
|
|
--- a/src/scripts/default-routes.lua
|
|
+++ b/src/scripts/default-routes.lua
|
|
@@ -8,7 +8,7 @@
|
|
--
|
|
-- SPDX-License-Identifier: MIT
|
|
|
|
-local config = ...
|
|
+local config = ... or {}
|
|
|
|
-- whether to store state on the file system
|
|
use_persistent_storage = config["use-persistent-storage"] or false
|
|
diff --git a/src/scripts/monitors/alsa-midi.lua b/src/scripts/monitors/alsa-midi.lua
|
|
index bf4fde4..0efee34 100644
|
|
--- a/src/scripts/monitors/alsa-midi.lua
|
|
+++ b/src/scripts/monitors/alsa-midi.lua
|
|
@@ -6,7 +6,7 @@
|
|
-- SPDX-License-Identifier: MIT
|
|
|
|
-- Receive script arguments from config.lua
|
|
-local config = ...
|
|
+local config = ... or {}
|
|
|
|
-- ensure config.properties is not nil
|
|
config.properties = config.properties or {}
|
|
diff --git a/src/scripts/monitors/alsa.lua b/src/scripts/monitors/alsa.lua
|
|
index c917a5c..3e8eda8 100644
|
|
--- a/src/scripts/monitors/alsa.lua
|
|
+++ b/src/scripts/monitors/alsa.lua
|
|
@@ -6,7 +6,7 @@
|
|
-- SPDX-License-Identifier: MIT
|
|
|
|
-- Receive script arguments from config.lua
|
|
-local config = ...
|
|
+local config = ... or {}
|
|
|
|
-- ensure config.properties is not nil
|
|
config.properties = config.properties or {}
|
|
diff --git a/src/scripts/policy-endpoint-client-links.lua b/src/scripts/policy-endpoint-client-links.lua
|
|
index 1a93294..eaa1c08 100644
|
|
--- a/src/scripts/policy-endpoint-client-links.lua
|
|
+++ b/src/scripts/policy-endpoint-client-links.lua
|
|
@@ -5,7 +5,7 @@
|
|
--
|
|
-- SPDX-License-Identifier: MIT
|
|
|
|
-local config = ...
|
|
+local config = ... or {}
|
|
config.roles = config.roles or {}
|
|
config["duck.level"] = config["duck.level"] or 0.3
|
|
|
|
diff --git a/src/scripts/policy-endpoint-client.lua b/src/scripts/policy-endpoint-client.lua
|
|
index e898e35..487d4b4 100644
|
|
--- a/src/scripts/policy-endpoint-client.lua
|
|
+++ b/src/scripts/policy-endpoint-client.lua
|
|
@@ -6,7 +6,7 @@
|
|
-- SPDX-License-Identifier: MIT
|
|
|
|
-- Receive script arguments from config.lua
|
|
-local config = ...
|
|
+local config = ... or {}
|
|
config.roles = config.roles or {}
|
|
|
|
local self = {}
|
|
diff --git a/src/scripts/policy-endpoint-device.lua b/src/scripts/policy-endpoint-device.lua
|
|
index b726cb3..71f7772 100644
|
|
--- a/src/scripts/policy-endpoint-device.lua
|
|
+++ b/src/scripts/policy-endpoint-device.lua
|
|
@@ -6,7 +6,7 @@
|
|
-- SPDX-License-Identifier: MIT
|
|
|
|
-- Receive script arguments from config.lua
|
|
-local config = ...
|
|
+local config = ... or {}
|
|
|
|
-- ensure config.move and config.follow are not nil
|
|
config.move = config.move or false
|
|
diff --git a/src/scripts/policy-node.lua b/src/scripts/policy-node.lua
|
|
index 9df5007..51a5549 100644
|
|
--- a/src/scripts/policy-node.lua
|
|
+++ b/src/scripts/policy-node.lua
|
|
@@ -6,7 +6,7 @@
|
|
-- SPDX-License-Identifier: MIT
|
|
|
|
-- Receive script arguments from config.lua
|
|
-local config = ...
|
|
+local config = ... or {}
|
|
|
|
-- ensure config.move and config.follow are not nil
|
|
config.move = config.move or false
|
|
--
|
|
2.34.1
|
|
|