diff --git a/engine/calldesc.go b/engine/calldesc.go index 5d1960e9d..7995d0965 100644 --- a/engine/calldesc.go +++ b/engine/calldesc.go @@ -266,7 +266,7 @@ func (cd *CallDescriptor) GetCost() (*CallCost, error) { destPrefix, err := cd.LoadActivationPeriods() if err != nil { Logger.Err(fmt.Sprintf("error getting cost for key %v: %v", cd.GetUserBalanceKey(), err)) - return &CallCost{}, err + return &CallCost{Cost: -1}, err } timespans := cd.splitInTimeSpans(nil) cost := 0.0 diff --git a/engine/storage_mongo.go b/engine/storage_mongo.go index 0c08d75bf..f75b6a971 100644 --- a/engine/storage_mongo.go +++ b/engine/storage_mongo.go @@ -134,7 +134,7 @@ func (ms *MongoStorage) GetRatingProfile(key string) (rp *RatingProfile, err err func (ms *MongoStorage) SetRatingProfile(rp *RatingProfile) error { if historyScribe != nil { response := 0 - go historyScribe.Record(&history.Record{RATING_PROFILE_PREFIX + rp.Id, rp}, &response) + historyScribe.Record(&history.Record{RATING_PROFILE_PREFIX + rp.Id, rp}, &response) } return ms.db.C("ratingprofiles").Insert(rp) } @@ -151,7 +151,7 @@ func (ms *MongoStorage) GetDestination(key string) (result *Destination, err err func (ms *MongoStorage) SetDestination(dest *Destination) error { if historyScribe != nil { response := 0 - go historyScribe.Record(&history.Record{DESTINATION_PREFIX + dest.Id, dest}, &response) + historyScribe.Record(&history.Record{DESTINATION_PREFIX + dest.Id, dest}, &response) } return ms.db.C("destinations").Insert(dest) }