mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
small cosmetic changes
This commit is contained in:
@@ -554,6 +554,7 @@ func (origCD *CallDescriptor) getMaxSessionDuration(origAcc *Account) (time.Dura
|
||||
if account.AllowNegative {
|
||||
return -1, nil
|
||||
}
|
||||
// for zero duration index
|
||||
if origCD.DurationIndex < origCD.TimeEnd.Sub(origCD.TimeStart) {
|
||||
origCD.DurationIndex = origCD.TimeEnd.Sub(origCD.TimeStart)
|
||||
}
|
||||
|
||||
@@ -145,9 +145,9 @@ func (ris RatingInfos) String() string {
|
||||
return string(b)
|
||||
}
|
||||
|
||||
func (rp *RatingProfile) GetRatingPlansForPrefix(cd *CallDescriptor) (err error) {
|
||||
func (rpf *RatingProfile) GetRatingPlansForPrefix(cd *CallDescriptor) (err error) {
|
||||
var ris RatingInfos
|
||||
for index, rpa := range rp.RatingPlanActivations.GetActiveForCall(cd) {
|
||||
for index, rpa := range rpf.RatingPlanActivations.GetActiveForCall(cd) {
|
||||
rpl, err := ratingStorage.GetRatingPlan(rpa.RatingPlanId, false)
|
||||
if err != nil || rpl == nil {
|
||||
utils.Logger.Err(fmt.Sprintf("Error checking destination: %v", err))
|
||||
@@ -202,7 +202,7 @@ func (rp *RatingProfile) GetRatingPlansForPrefix(cd *CallDescriptor) (err error)
|
||||
}
|
||||
if len(prefix) > 0 {
|
||||
ris = append(ris, &RatingInfo{
|
||||
MatchedSubject: rp.Id,
|
||||
MatchedSubject: rpf.Id,
|
||||
RatingPlanId: rpl.Id,
|
||||
MatchedPrefix: prefix,
|
||||
MatchedDestId: destinationId,
|
||||
|
||||
Reference in New Issue
Block a user