mirror of
https://github.com/safing/portmaster
synced 2025-09-02 10:39:22 +00:00
Make function to increase profile revision counter internal
This commit is contained in:
parent
6a430d1d7c
commit
3e17bc8ec2
2 changed files with 5 additions and 4 deletions
|
@ -92,7 +92,7 @@ func startProfileUpdateChecker() error {
|
|||
// Always increase the revision counter of the layer profile.
|
||||
// This marks previous connections in the UI as decided with outdated settings.
|
||||
if activeProfile.layeredProfile != nil {
|
||||
activeProfile.layeredProfile.IncreaseRevisionCounter(true)
|
||||
activeProfile.layeredProfile.increaseRevisionCounter(true)
|
||||
}
|
||||
|
||||
// If the profile is saved externally (eg. via the API), have the
|
||||
|
|
|
@ -165,8 +165,9 @@ func (lp *LayeredProfile) LocalProfile() *Profile {
|
|||
return lp.localProfile
|
||||
}
|
||||
|
||||
// RevisionCnt returns the current profile revision counter.
|
||||
func (lp *LayeredProfile) IncreaseRevisionCounter(lock bool) (revisionCounter uint64) {
|
||||
// increaseRevisionCounter increases the revision counter and pushes the
|
||||
// layered profile to listeners.
|
||||
func (lp *LayeredProfile) increaseRevisionCounter(lock bool) (revisionCounter uint64) {
|
||||
if lp == nil {
|
||||
return 0
|
||||
}
|
||||
|
@ -260,7 +261,7 @@ func (lp *LayeredProfile) Update() (revisionCounter uint64) {
|
|||
lp.updateCaches()
|
||||
|
||||
// bump revision counter
|
||||
lp.IncreaseRevisionCounter(false)
|
||||
lp.increaseRevisionCounter(false)
|
||||
}
|
||||
|
||||
return lp.RevisionCounter
|
||||
|
|
Loading…
Add table
Reference in a new issue