Module: sip-router
Branch: carstenbock/ims
Commit: 8deb67d3029dcf714efe772a5d11d17de1aa8dfb
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=8deb67d…
Author: Carsten Bock <carsten(a)bock.info>
Committer: Carsten Bock <carsten(a)bock.info>
Date: Thu Jan 6 22:47:58 2011 +0100
- made the MGCF Module compilable using Kamailio
---
modules/mgcf/Makefile | 11 ++++++++---
modules/mgcf/dlg_state.c | 2 +-
modules/mgcf/mod.c | 2 +-
modules/mgcf/release_call.c | 6 +++++-
modules/mgcf/release_call.h | 2 +-
5 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/modules/mgcf/Makefile b/modules/mgcf/Makefile
index 553389f..b34ecbe 100644
--- a/modules/mgcf/Makefile
+++ b/modules/mgcf/Makefile
@@ -6,12 +6,17 @@
# WARNING: do not run this directly, it should be run by the master Makefile
include ../../Makefile.defs
+
auto_gen=
NAME=mgcf.so
-include ../../Makefile.modules
+DEFS+=-DSER_MOD_INTERFACE
+DEFS+=-DSER
-#DEFS += -I../../lib -DSER -I../..
-#LIBS += -L../../lib/cds -l_ser_cds
+SERLIBPATH=../../lib
+INCLUDES = -I../../lib -I../..
+SER_LIBS+=$(SERLIBPATH)/srdb1/srdb1 $(SERLIBPATH)/cds/ser_cds
+
+include ../../Makefile.modules
#DEFS += -DWITH_IMS_PM
diff --git a/modules/mgcf/dlg_state.c b/modules/mgcf/dlg_state.c
index 02a58a9..05b26fa 100644
--- a/modules/mgcf/dlg_state.c
+++ b/modules/mgcf/dlg_state.c
@@ -532,7 +532,7 @@ void print_m_dialogs(int log_level)
{
m_dialog *d;
int i,j;
- if (debug<log_level) return; /* to avoid useless calls when nothing will be printed
*/
+ if (L_DBG<log_level) return; /* to avoid useless calls when nothing will be printed
*/
d_act_time();
LOG(log_level,"INF:"M_NAME":---------- MGCF Dialog List begin
--------------\n");
for(i=0;i<m_dialogs_hash_size;i++){
diff --git a/modules/mgcf/mod.c b/modules/mgcf/mod.c
index e9fb9cf..b7c78b9 100644
--- a/modules/mgcf/mod.c
+++ b/modules/mgcf/mod.c
@@ -63,7 +63,7 @@
#include "../../timer.h"
#include "../../locking.h"
#include "../tm/tm_load.h"
-#include "../dialog/dlg_mod.h"
+#include "../../modules_s/dialog/dlg_mod.h"
#include "../../pt.h"
diff --git a/modules/mgcf/release_call.c b/modules/mgcf/release_call.c
index 5461f0b..7717772 100644
--- a/modules/mgcf/release_call.c
+++ b/modules/mgcf/release_call.c
@@ -312,7 +312,11 @@ int release_call_previous(m_dialog *d,enum release_call_situation
situation,int
if (t && t!=(void*) -1 && t->uas.request) {
/*first trick: i really want to get this reply sent even though we are onreply*/
+#ifdef SER_MOD_INTERFACE
+ route_type = FAILURE_ROUTE;
+#else
*tmb.route_mode=MODE_ONFAILURE;
+#endif
/*second trick .. i haven't recieve any response from the uac
* if i don't do this i get a cancel sent to the S-CSCF .. its not a big deal*/
@@ -324,7 +328,7 @@ int release_call_previous(m_dialog *d,enum release_call_situation
situation,int
/*now its safe to do this*/
tmb.t_reply(t->uas.request,reason_code,reason_text.s);
- *tmb.route_mode=MODE_ONREPLY;
+ // *tmb.route_mode=MODE_ONREPLY;
tmb.t_release(t->uas.request);
/*needed because if not i get last message retransmited...
diff --git a/modules/mgcf/release_call.h b/modules/mgcf/release_call.h
index a914b5d..137a315 100644
--- a/modules/mgcf/release_call.h
+++ b/modules/mgcf/release_call.h
@@ -58,7 +58,7 @@
#define RELEASE_CALL_H_
#include "../tm/tm_load.h"
#include "dlg_state.h"
-#include "../dialog/dlg_mod.h"
+#include "../../modules_s/dialog/dlg_mod.h"
#include "sip.h"