1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/1f045309208ab5d927883b5adc2b7d1623fae162
From 1f045309208ab5d927883b5adc2b7d1623fae162 Mon Sep 17 00:00:00 2001
From: George Kiagiadakis <george.kiagiadakis@collabora.com>
Date: Thu, 12 May 2022 12:19:38 +0300
Subject: [PATCH] config: fix enabled property to default to "true" when not
defined
Fixes backwards compatibility with older config files
Fixes: #254
---
src/config/bluetooth.lua.d/30-bluez-monitor.lua | 2 +-
src/config/main.lua.d/20-default-access.lua | 2 +-
src/config/main.lua.d/30-alsa-monitor.lua | 2 +-
src/config/main.lua.d/30-libcamera-monitor.lua | 2 +-
src/config/main.lua.d/30-v4l2-monitor.lua | 2 +-
src/config/main.lua.d/40-device-defaults.lua | 2 +-
src/config/main.lua.d/40-stream-defaults.lua | 2 +-
src/config/policy.lua.d/10-default-policy.lua | 2 +-
8 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/config/bluetooth.lua.d/30-bluez-monitor.lua b/src/config/bluetooth.lua.d/30-bluez-monitor.lua
index b40026c2..a870aa5d 100644
--- a/src/config/bluetooth.lua.d/30-bluez-monitor.lua
+++ b/src/config/bluetooth.lua.d/30-bluez-monitor.lua
@@ -3,7 +3,7 @@ bluez_monitor.properties = {}
bluez_monitor.rules = {}
function bluez_monitor.enable()
- if not bluez_monitor.enabled then
+ if bluez_monitor.enabled == false then
return
end
diff --git a/src/config/main.lua.d/20-default-access.lua b/src/config/main.lua.d/20-default-access.lua
index a6ffb2ee..0a7eb955 100644
--- a/src/config/main.lua.d/20-default-access.lua
+++ b/src/config/main.lua.d/20-default-access.lua
@@ -3,7 +3,7 @@ default_access.properties = {}
default_access.rules = {}
function default_access.enable()
- if not default_access.enabled then
+ if default_access.enabled == false then
return
end
diff --git a/src/config/main.lua.d/30-alsa-monitor.lua b/src/config/main.lua.d/30-alsa-monitor.lua
index da0b2c70..8e45e434 100644
--- a/src/config/main.lua.d/30-alsa-monitor.lua
+++ b/src/config/main.lua.d/30-alsa-monitor.lua
@@ -3,7 +3,7 @@ alsa_monitor.properties = {}
alsa_monitor.rules = {}
function alsa_monitor.enable()
- if not alsa_monitor.enabled then
+ if alsa_monitor.enabled == false then
return
end
diff --git a/src/config/main.lua.d/30-libcamera-monitor.lua b/src/config/main.lua.d/30-libcamera-monitor.lua
index 4a8257ff..cd820a83 100644
--- a/src/config/main.lua.d/30-libcamera-monitor.lua
+++ b/src/config/main.lua.d/30-libcamera-monitor.lua
@@ -3,7 +3,7 @@ libcamera_monitor.properties = {}
libcamera_monitor.rules = {}
function libcamera_monitor.enable()
- if not libcamera_monitor.enabled then
+ if libcamera_monitor.enabled == false then
return
end
diff --git a/src/config/main.lua.d/30-v4l2-monitor.lua b/src/config/main.lua.d/30-v4l2-monitor.lua
index 7cfd4bcd..3fbdc9e7 100644
--- a/src/config/main.lua.d/30-v4l2-monitor.lua
+++ b/src/config/main.lua.d/30-v4l2-monitor.lua
@@ -3,7 +3,7 @@ v4l2_monitor.properties = {}
v4l2_monitor.rules = {}
function v4l2_monitor.enable()
- if not v4l2_monitor.enabled then
+ if v4l2_monitor.enabled == false then
return
end
diff --git a/src/config/main.lua.d/40-device-defaults.lua b/src/config/main.lua.d/40-device-defaults.lua
index 55aafe85..2204c4ac 100644
--- a/src/config/main.lua.d/40-device-defaults.lua
+++ b/src/config/main.lua.d/40-device-defaults.lua
@@ -38,7 +38,7 @@ device_defaults.persistent_profiles = {
}
function device_defaults.enable()
- if not device_defaults.enabled then
+ if device_defaults.enabled == false then
return
end
diff --git a/src/config/main.lua.d/40-stream-defaults.lua b/src/config/main.lua.d/40-stream-defaults.lua
index 2975f4f6..307d83df 100644
--- a/src/config/main.lua.d/40-stream-defaults.lua
+++ b/src/config/main.lua.d/40-stream-defaults.lua
@@ -25,7 +25,7 @@ stream_defaults.rules = {
}
function stream_defaults.enable()
- if not stream_defaults.enabled then
+ if stream_defaults.enabled == false then
return
end
diff --git a/src/config/policy.lua.d/10-default-policy.lua b/src/config/policy.lua.d/10-default-policy.lua
index 7b00e94e..edfdeb1c 100644
--- a/src/config/policy.lua.d/10-default-policy.lua
+++ b/src/config/policy.lua.d/10-default-policy.lua
@@ -38,7 +38,7 @@ bluetooth_policy.policy = {
}
function default_policy.enable()
- if not default_policy.enabled then
+ if default_policy.enabled == false then
return
end
--
GitLab
|