Module: sip-router
Branch: master
Commit: 2dc78738af4a0693e0a4d3f77e2174586d53d90b
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2dc7873…
Author: Carlos Ruiz Diaz <carlos.ruizdiaz(a)gmail.com>
Committer: Carlos Ruiz Diaz <carlos.ruizdiaz(a)gmail.com>
Date: Tue Oct 8 15:52:09 2013 -0300
ims_charging: removed session unlock function call when no lock was acquired
---
modules/ims_charging/dialog.c | 2 +-
modules/ims_charging/ims_ro.c | 13 +++++++------
modules/ims_charging/ro_timer.c | 6 ++++--
3 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/modules/ims_charging/dialog.c b/modules/ims_charging/dialog.c
index caac6c7..c592bda 100644
--- a/modules/ims_charging/dialog.c
+++ b/modules/ims_charging/dialog.c
@@ -80,7 +80,7 @@ void dlg_reply(struct dlg_cell *dlg, int type, struct dlg_cb_params
*_params) {
// ro_session_unlock(ro_session_table, ro_session_entry);
cdpb.AAAStartChargingCCAccSession(cdp_session);
- cdpb.AAASessionsUnlock(cdp_session->hash);
+// cdpb.AAASessionsUnlock(cdp_session->hash);
// unref_ro_session(session, 1); DONT need this anymore because we don't do lookup
so no addition to ref counter
}
diff --git a/modules/ims_charging/ims_ro.c b/modules/ims_charging/ims_ro.c
index 609a143..d0c67ac 100644
--- a/modules/ims_charging/ims_ro.c
+++ b/modules/ims_charging/ims_ro.c
@@ -698,8 +698,8 @@ error:
if (ro_cca_data)
Ro_free_CCA(ro_cca_data);
- if (ro_cca_data)
- cdpb.AAAFreeMessage(&cca);
+// if (ro_cca_data)
+ cdpb.AAAFreeMessage(&cca);
if (i_req) {
i_req->credit_valid_for = 0;
@@ -861,15 +861,14 @@ static void resume_on_termination_ccr(int is_timeout, void *param,
AAAMessage *c
LM_DBG("Valid CCA response for STOP record\n");
}
- Ro_free_CCA(ro_cca_data);
- cdpb.AAAFreeMessage(&cca);
+// Ro_free_CCA(ro_cca_data);
+// cdpb.AAAFreeMessage(&cca);
update_stat(successful_final_ccrs, 1);
- return;
-
error:
Ro_free_CCA(ro_cca_data);
+ cdpb.AAAFreeMessage(&cca);
}
@@ -1112,6 +1111,8 @@ error0:
LM_DBG("Trying to reserve credit on initial INVITE failed on cdp
callback\n");
create_cca_return_code(error_code);
+ cdpb.AAAFreeMessage(&cca);
+
if (t)
tmb.unref_cell(t);
diff --git a/modules/ims_charging/ro_timer.c b/modules/ims_charging/ro_timer.c
index 9344cd1..e2ee233 100644
--- a/modules/ims_charging/ro_timer.c
+++ b/modules/ims_charging/ro_timer.c
@@ -363,10 +363,12 @@ void ro_session_ontimeout(struct ro_tl *tl) {
LM_ERR("Can't find a session. This is bad");
return;
}
-
+
+// LM_ALERT("LOCKING... ");
ro_session_entry = &(ro_session_table->entries[ro_session->h_entry]);
ro_session_lock(ro_session_table, ro_session_entry);
-
+// LM_ALERT("LOCKED!");
+
LM_DBG("event-type=%d", ro_session->event_type);
switch (ro_session->event_type) {