Module: kamailio
Branch: master
Commit: 83180ee7602b69d9c9cee85925c0282baf6f58b8
URL:
https://github.com/kamailio/kamailio/commit/83180ee7602b69d9c9cee85925c0282…
Author: jaybeepee <jason.penton(a)gmail.com>
Committer: jaybeepee <jason.penton(a)gmail.com>
Date: 2015-05-13T11:05:01+02:00
modules/ims_charging: return false if Ro CCR returns with GSU <=0
- This caters for strange case where OCS returns CCR success
with a GSU of 0 (or less) seconds....
---
Modified: modules/ims_charging/ims_ro.c
---
Diff:
https://github.com/kamailio/kamailio/commit/83180ee7602b69d9c9cee85925c0282…
Patch:
https://github.com/kamailio/kamailio/commit/83180ee7602b69d9c9cee85925c0282…
---
diff --git a/modules/ims_charging/ims_ro.c b/modules/ims_charging/ims_ro.c
index 56b88a0..7215036 100644
--- a/modules/ims_charging/ims_ro.c
+++ b/modules/ims_charging/ims_ro.c
@@ -1218,6 +1218,12 @@ static void resume_on_initial_ccr(int is_timeout, void *param,
AAAMessage *cca,
LM_DBG("Valid CCA response with time chunk of [%i] and validity [%i]\n",
ro_cca_data->mscc->granted_service_unit->cc_time,
ro_cca_data->mscc->validity_time);
+
+ if (ro_cca_data->mscc->granted_service_unit->cc_time <=0 ) {
+ LM_DBG("got zero GSU.... reservation failed");
+ error_code = RO_RETURN_FALSE;
+ goto error1;
+ }
ssd->ro_session->last_event_timestamp = time(0);
ssd->ro_session->event_type = pending;