fix for the lock issue

This commit is contained in:
Radu Ioan Fericean
2015-04-03 22:33:16 +03:00
parent 8037f99cb8
commit eb60e6caf5
6 changed files with 20 additions and 67 deletions

View File

@@ -49,18 +49,6 @@ type SharingParameters struct {
RatingSubject string
}
func (sg *SharedGroup) GetMembersExceptUser(ubId string) []string {
for i, m := range sg.MemberIds {
if m == ubId {
a := make([]string, len(sg.MemberIds))
copy(a, sg.MemberIds)
a[i], a = a[len(a)-1], a[:len(a)-1]
return a
}
}
return sg.MemberIds
}
func (sg *SharedGroup) SortBalancesByStrategy(myBalance *Balance, bc BalanceChain) BalanceChain {
sharingParameters := sg.AccountParameters[utils.ANY]
if sp, hasParamsForAccount := sg.AccountParameters[myBalance.account.Id]; hasParamsForAccount {