mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 10:06:24 +05:00
using an temp variable for lkID in unlock method
This commit is contained in:
committed by
Dan Christian Bogos
parent
32a02a694a
commit
f3ca5b0016
@@ -104,8 +104,9 @@ func (ip *IPProfile) unlock() {
|
||||
if ip.lkID == utils.EmptyString {
|
||||
return
|
||||
}
|
||||
guardian.Guardian.UnguardIDs(ip.lkID)
|
||||
tmp := ip.lkID
|
||||
ip.lkID = utils.EmptyString
|
||||
guardian.Guardian.UnguardIDs(tmp)
|
||||
}
|
||||
|
||||
// IPUsage represents an usage counted.
|
||||
@@ -206,8 +207,10 @@ func (ip *IP) unlock() {
|
||||
if ip.lkID == utils.EmptyString {
|
||||
return
|
||||
}
|
||||
guardian.Guardian.UnguardIDs(ip.lkID)
|
||||
tmp := ip.lkID
|
||||
ip.lkID = utils.EmptyString
|
||||
guardian.Guardian.UnguardIDs(tmp)
|
||||
|
||||
}
|
||||
|
||||
type IPWithAPIOpts struct {
|
||||
|
||||
@@ -119,8 +119,9 @@ func (sqp *StatQueueProfile) unlock() {
|
||||
if sqp.lkID == utils.EmptyString {
|
||||
return
|
||||
}
|
||||
guardian.Guardian.UnguardIDs(sqp.lkID)
|
||||
tmp := sqp.lkID
|
||||
sqp.lkID = utils.EmptyString
|
||||
guardian.Guardian.UnguardIDs(tmp)
|
||||
}
|
||||
|
||||
// isLocked returns the locks status of this StatQueueProfile
|
||||
@@ -320,8 +321,10 @@ func (sq *StatQueue) unlock() {
|
||||
if sq.lkID == utils.EmptyString {
|
||||
return
|
||||
}
|
||||
guardian.Guardian.UnguardIDs(sq.lkID)
|
||||
tmp := sq.lkID
|
||||
sq.lkID = utils.EmptyString
|
||||
guardian.Guardian.UnguardIDs(tmp)
|
||||
|
||||
}
|
||||
|
||||
// isLocked returns the locks status of this StatQueue
|
||||
|
||||
@@ -114,8 +114,10 @@ func (rp *ResourceProfile) unlock() {
|
||||
if rp.lkID == utils.EmptyString {
|
||||
return
|
||||
}
|
||||
guardian.Guardian.UnguardIDs(rp.lkID)
|
||||
tmp := rp.lkID
|
||||
rp.lkID = utils.EmptyString
|
||||
guardian.Guardian.UnguardIDs(tmp)
|
||||
|
||||
}
|
||||
|
||||
// isLocked returns the locks status of this resourceProfile
|
||||
@@ -228,8 +230,9 @@ func (r *Resource) unlock() {
|
||||
if r.lkID == utils.EmptyString {
|
||||
return
|
||||
}
|
||||
guardian.Guardian.UnguardIDs(r.lkID)
|
||||
tmp := r.lkID
|
||||
r.lkID = utils.EmptyString
|
||||
guardian.Guardian.UnguardIDs(tmp)
|
||||
}
|
||||
|
||||
// isLocked returns the locks status of this resource
|
||||
|
||||
@@ -117,8 +117,9 @@ func (tp *ThresholdProfile) unlock() {
|
||||
if tp.lkID == utils.EmptyString {
|
||||
return
|
||||
}
|
||||
guardian.Guardian.UnguardIDs(tp.lkID)
|
||||
tmp := tp.lkID
|
||||
tp.lkID = utils.EmptyString
|
||||
guardian.Guardian.UnguardIDs(tmp)
|
||||
}
|
||||
|
||||
// isLocked returns the locks status of this ThresholdProfile
|
||||
@@ -209,8 +210,9 @@ func (t *Threshold) unlock() {
|
||||
if t.lkID == utils.EmptyString {
|
||||
return
|
||||
}
|
||||
guardian.Guardian.UnguardIDs(t.lkID)
|
||||
tmp := t.lkID
|
||||
t.lkID = utils.EmptyString
|
||||
guardian.Guardian.UnguardIDs(tmp)
|
||||
}
|
||||
|
||||
// isLocked returns the locks status of this threshold
|
||||
|
||||
Reference in New Issue
Block a user