Add check for duplicate filesystem names

This commit is contained in:
Ingo Oppermann
2023-01-31 15:53:48 +01:00
parent f519acfd71
commit e3d25b1bdd

View File

@@ -380,6 +380,21 @@ func (d *Config) Validate(resetLogs bool) {
}
}
if len(d.Storage.S3) != 0 {
names := map[string]struct{}{
"disk": {},
"mem": {},
}
for _, s3 := range d.Storage.S3 {
if _, ok := names[s3.Name]; ok {
d.vars.Log("error", "storage.s3", "the name %s is already in use or reserved", s3.Name)
}
names[s3.Name] = struct{}{}
}
}
// If playout is enabled, check that the port range is sane
if d.Playout.Enable {
if d.Playout.MinPort >= d.Playout.MaxPort {