Module: sip-router
Branch: tmp/dialog_ng
Commit: 7cdbeb7fea2b024924bc6b61d4edd714a884922a
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=7cdbeb7…
Author: Carlos Ruiz Diaz <carlos.ruizdiaz(a)gmail.com>
Committer: Carlos Ruiz Diaz <carlos.ruizdiaz(a)gmail.com>
Date: Sat Nov 16 20:11:07 2013 -0300
dialog_ng: added lookup_dlg() function to dlg binds.
- lookup_dlg will be used by the ims_charging module to locate dialog cell using
h_entry_id and h_id
---
modules/dialog_ng/dialog.c | 1 +
modules/dialog_ng/dlg_db_handler.c | 3 ---
modules/dialog_ng/dlg_load.h | 5 ++++-
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/modules/dialog_ng/dialog.c b/modules/dialog_ng/dialog.c
index 17ae591..844e1c6 100644
--- a/modules/dialog_ng/dialog.c
+++ b/modules/dialog_ng/dialog.c
@@ -337,6 +337,7 @@ int load_dlg(struct dlg_binds *dlgb) {
dlgb->lookup_terminate_dlg = w_api_lookup_terminate_dlg;
dlgb->get_dlg_expires = api_get_dlg_expires;
dlgb->get_dlg = dlg_get_msg_dialog;
+ dlgb->lookup_dlg = lookup_dlg;
return 1;
}
diff --git a/modules/dialog_ng/dlg_db_handler.c b/modules/dialog_ng/dlg_db_handler.c
index bdc06ac..594f0d4 100644
--- a/modules/dialog_ng/dlg_db_handler.c
+++ b/modules/dialog_ng/dlg_db_handler.c
@@ -126,7 +126,6 @@ extern int dlg_enable_stats;
extern int active_dlgs_cnt;
extern int early_dlgs_cnt;
-
#define GET_FIELD_IDX(_val, _idx)\
(_val + _idx)
@@ -643,8 +642,6 @@ error:
}
-
-
static int select_entire_dialog_vars_table(db1_res_t ** res, int fetch_num_rows)
{
db_key_t query_cols[DIALOG_VARS_TABLE_COL_NO] = {
diff --git a/modules/dialog_ng/dlg_load.h b/modules/dialog_ng/dlg_load.h
index 5f9c8a1..465fab7 100644
--- a/modules/dialog_ng/dlg_load.h
+++ b/modules/dialog_ng/dlg_load.h
@@ -43,15 +43,18 @@ typedef struct dlg_cell *(*get_dlg_f)(struct sip_msg *msg);
/* get_dlg_lifetime function prototype */
typedef time_t (*get_dlg_expires_f)(str *callid, str *ftag, str *ttag);
+typedef struct dlg_cell* (*lookup_dlg_f)(unsigned int h_entry, unsigned int h_id);
+
struct dlg_binds {
register_dlgcb_f register_dlgcb;
register_dlgcb_nodlg_f register_dlgcb_nodlg;
terminate_dlg_f terminate_dlg;
- lookup_terminate_dlg_f lookup_terminate_dlg;
+ lookup_terminate_dlg_f lookup_terminate_dlg;
set_dlg_variable_f set_dlg_var;
get_dlg_variable_f get_dlg_var;
get_dlg_expires_f get_dlg_expires;
get_dlg_f get_dlg;
+ lookup_dlg_f lookup_dlg;
};