Avoid concurentiality problems

This commit is contained in:
TeoV
2019-05-17 13:31:51 +03:00
committed by Dan Christian Bogos
parent bf10cc1fc5
commit ae95d1b15c
2 changed files with 0 additions and 10 deletions

View File

@@ -144,11 +144,6 @@ func (cS *ChargerService) processEvent(cgrEv *utils.CGREventWithArgDispatcher) (
rply[i].AlteredFields = evReply.AlteredFields
if len(evReply.AlteredFields) != 0 {
rply[i].CGREvent = evReply.CGREvent
if tntIface, has := rply[i].CGREvent.Event[utils.MetaTenant]; has {
// special case when we want to overwrite the tenant
rply[i].CGREvent.Tenant = tntIface.(string)
delete(rply[i].CGREvent.Event, utils.MetaTenant)
}
}
}
return

View File

@@ -503,11 +503,6 @@ func (spS *SupplierService) V1GetSuppliers(args *ArgsGetSuppliers, reply *Sorted
if err := spS.attributeS.Call(utils.AttributeSv1ProcessEvent,
attrArgs, &rplyEv); err == nil && len(rplyEv.AlteredFields) != 0 {
args.CGREvent = *rplyEv.CGREvent
if tntIface, has := args.CGREvent.Event[utils.MetaTenant]; has {
// special case when we want to overwrite the tenant
args.CGREvent.Tenant = tntIface.(string)
delete(args.CGREvent.Event, utils.MetaTenant)
}
} else if err.Error() != utils.ErrNotFound.Error() {
return utils.NewErrAttributeS(err)
}