Module: kamailio
Branch: master
Commit: f087a82fd54f337c8ba746fb8919561c9a757651
URL:
https://github.com/kamailio/kamailio/commit/f087a82fd54f337c8ba746fb8919561…
Author: Marco Sinibaldi <marco.sinibaldi(a)athonet.com>
Committer: Marco Sinibaldi <marco.sinibaldi(a)athonet.com>
Date: 2016-07-21T14:43:22+02:00
ims_charging: Ignore Ro Validity-Time AVP if 0 or missing.
---
Modified: modules/ims_charging/ro_timer.c
---
Diff:
https://github.com/kamailio/kamailio/commit/f087a82fd54f337c8ba746fb8919561…
Patch:
https://github.com/kamailio/kamailio/commit/f087a82fd54f337c8ba746fb8919561…
---
diff --git a/modules/ims_charging/ro_timer.c b/modules/ims_charging/ro_timer.c
index ded2a4b..3f6c8dd 100644
--- a/modules/ims_charging/ro_timer.c
+++ b/modules/ims_charging/ro_timer.c
@@ -280,7 +280,7 @@ void resume_ro_session_ontimeout(struct interim_ccr *i_req, int
timeout_or_error
used_secs = rint((now - ((timeout_or_error==1 &&
i_req->ro_session->last_event_timestamp_backup>0)?i_req->ro_session->last_event_timestamp_backup
: i_req->ro_session->last_event_timestamp)) / (float) 1000000);
/* check to make sure diameter server is giving us sane values */
- if (i_req->new_credit > i_req->credit_valid_for) {
+ if (i_req->credit_valid_for !=0 && i_req->new_credit >
i_req->credit_valid_for) {
LM_WARN("That's weird, Diameter server gave us credit with a lower
validity period :D. Setting reserved time to validity period instead \n");
i_req->new_credit = i_req->credit_valid_for;
}