mirror of
https://github.com/safing/portmaster
synced 2025-04-25 13:29:10 +00:00
Ensure profile settings are always validated on first use
This commit is contained in:
parent
7b1a672d7f
commit
30863d9fa3
1 changed files with 4 additions and 3 deletions
|
@ -61,6 +61,7 @@ func NewLayeredProfile(localProfile *Profile) *LayeredProfile {
|
|||
layers: make([]*Profile, 0, len(localProfile.LinkedProfiles)+1),
|
||||
LayerIDs: make([]string, 0, len(localProfile.LinkedProfiles)+1),
|
||||
globalValidityFlag: config.NewValidityFlag(),
|
||||
RevisionCounter: 1,
|
||||
securityLevel: &securityLevelVal,
|
||||
}
|
||||
|
||||
|
@ -360,7 +361,7 @@ func (lp *LayeredProfile) wrapSecurityLevelOption(configKey string, globalConfig
|
|||
}
|
||||
|
||||
func (lp *LayeredProfile) wrapBoolOption(configKey string, globalConfig config.BoolOption) config.BoolOption {
|
||||
revCnt := lp.RevisionCounter
|
||||
var revCnt uint64 = 0
|
||||
var value bool
|
||||
var refreshLock sync.Mutex
|
||||
|
||||
|
@ -392,7 +393,7 @@ func (lp *LayeredProfile) wrapBoolOption(configKey string, globalConfig config.B
|
|||
}
|
||||
|
||||
func (lp *LayeredProfile) wrapIntOption(configKey string, globalConfig config.IntOption) config.IntOption {
|
||||
revCnt := lp.RevisionCounter
|
||||
var revCnt uint64 = 0
|
||||
var value int64
|
||||
var refreshLock sync.Mutex
|
||||
|
||||
|
@ -441,7 +442,7 @@ func (lp *LayeredProfile) GetProfileSource(configKey string) string {
|
|||
For later:
|
||||
|
||||
func (lp *LayeredProfile) wrapStringOption(configKey string, globalConfig config.StringOption) config.StringOption {
|
||||
revCnt := lp.RevisionCounter
|
||||
var revCnt uint64 = 0
|
||||
var value string
|
||||
var refreshLock sync.Mutex
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue