Module: sip-router
Branch: tmp/dialog_ng
Commit: 93b43dbd267163e683ac3ee974d0059a4f83d859
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=93b43db…
Author: Carlos Ruiz Diaz <carlos.ruizdiaz(a)gmail.com>
Committer: Carlos Ruiz Diaz <carlos.ruizdiaz(a)gmail.com>
Date: Wed Nov 6 13:06:22 2013 -0300
tmp/dialog_ng: fixed bug in setting proper null flags for db storage
---
modules/dialog_ng/dlg_db_handler.c | 36 +++++++++++++++++++-----------------
1 files changed, 19 insertions(+), 17 deletions(-)
diff --git a/modules/dialog_ng/dlg_db_handler.c b/modules/dialog_ng/dlg_db_handler.c
index 9fa06bf..bdc06ac 100644
--- a/modules/dialog_ng/dlg_db_handler.c
+++ b/modules/dialog_ng/dlg_db_handler.c
@@ -1020,25 +1020,25 @@ int update_dialog_dbinfo_unsafe(struct dlg_cell * cell)
&sflags_column, &to_route_name_column, &to_route_index_column };
/* save all the current dialogs information*/
- VAL_TYPE(GET_FIELD_IDX(values, DLGI_ID_COL_IDX)) = DB1_INT;
+ VAL_TYPE(GET_FIELD_IDX(values, DLGI_ID_COL_IDX)) = DB1_INT;
VAL_TYPE(GET_FIELD_IDX(values, DLGI_HASH_ENTRY_COL_IDX))= DB1_INT;
- VAL_TYPE(GET_FIELD_IDX(values, DLGI_HASH_ID_COL_IDX)) = DB1_INT;
+ VAL_TYPE(GET_FIELD_IDX(values, DLGI_HASH_ID_COL_IDX)) = DB1_INT;
- VAL_TYPE(GET_FIELD_IDX(values, DLGI_STATE_COL_IDX)) = DB1_INT;
- VAL_TYPE(GET_FIELD_IDX(values, DLGI_START_TIME_COL_IDX)) = DB1_INT;
- VAL_TYPE(GET_FIELD_IDX(values, DLGI_TIMEOUT_COL_IDX)) = DB1_INT;
- VAL_TYPE(GET_FIELD_IDX(values, DLGI_SFLAGS_COL_IDX)) = DB1_INT;
+ VAL_TYPE(GET_FIELD_IDX(values, DLGI_STATE_COL_IDX)) = DB1_INT;
+ VAL_TYPE(GET_FIELD_IDX(values, DLGI_START_TIME_COL_IDX)) = DB1_INT;
+ VAL_TYPE(GET_FIELD_IDX(values, DLGI_TIMEOUT_COL_IDX)) = DB1_INT;
+ VAL_TYPE(GET_FIELD_IDX(values, DLGI_SFLAGS_COL_IDX)) = DB1_INT;
VAL_TYPE(GET_FIELD_IDX(values, DLGI_TOROUTE_INDEX_COL_IDX)) = DB1_INT;
- VAL_TYPE(GET_FIELD_IDX(values, DLGI_DID_COL_IDX)) = DB1_STR;
- VAL_TYPE(GET_FIELD_IDX(values, DLGI_CALLID_COL_IDX)) = DB1_STR;
- VAL_TYPE(GET_FIELD_IDX(values, DLGI_FROM_URI_COL_IDX)) = DB1_STR;
- VAL_TYPE(GET_FIELD_IDX(values, DLGI_FROM_TAG_COL_IDX)) = DB1_STR;
- VAL_TYPE(GET_FIELD_IDX(values, DLGI_CALLER_CSEQ_COL_IDX)) = DB1_STR;
- VAL_TYPE(GET_FIELD_IDX(values, DLGI_REQ_URI_COL_IDX)) = DB1_STR;
+ VAL_TYPE(GET_FIELD_IDX(values, DLGI_DID_COL_IDX)) = DB1_STR;
+ VAL_TYPE(GET_FIELD_IDX(values, DLGI_CALLID_COL_IDX)) = DB1_STR;
+ VAL_TYPE(GET_FIELD_IDX(values, DLGI_FROM_URI_COL_IDX)) = DB1_STR;
+ VAL_TYPE(GET_FIELD_IDX(values, DLGI_FROM_TAG_COL_IDX)) = DB1_STR;
+ VAL_TYPE(GET_FIELD_IDX(values, DLGI_CALLER_CSEQ_COL_IDX)) = DB1_STR;
+ VAL_TYPE(GET_FIELD_IDX(values, DLGI_REQ_URI_COL_IDX)) = DB1_STR;
VAL_TYPE(GET_FIELD_IDX(values, DLGI_CALLER_ROUTESET_COL_IDX))= DB1_STR;
VAL_TYPE(GET_FIELD_IDX(values, DLGI_CALLER_CONTACT_COL_IDX))= DB1_STR;
- VAL_TYPE(GET_FIELD_IDX(values, DLGI_CALLER_SOCK_IDX)) = DB1_STR;
+ VAL_TYPE(GET_FIELD_IDX(values, DLGI_CALLER_SOCK_IDX)) = DB1_STR;
VAL_TYPE(GET_FIELD_IDX(values, DLGI_TOROUTE_NAME_COL_IDX)) = DB1_STR;
VAL_INT(GET_FIELD_IDX(values, DLGI_HASH_ENTRY_COL_IDX)) = cell->h_entry;
@@ -1075,11 +1075,13 @@ int update_dialog_dbinfo_unsafe(struct dlg_cell * cell)
SET_PROPER_NULL_FLAG(cell->toroute_name, values, DLGI_TOROUTE_NAME_COL_IDX);
SET_PROPER_NULL_FLAG(cell->first_req_cseq, values, DLGI_CALLER_CSEQ_COL_IDX);
- VAL_NULL(GET_FIELD_IDX(values, DLGI_HASH_ENTRY_COL_IDX))= 0;
- VAL_NULL(GET_FIELD_IDX(values, DLGI_HASH_ID_COL_IDX)) = 0;
- VAL_NULL(GET_FIELD_IDX(values, DLGI_STATE_COL_IDX)) = 0;
+ VAL_NULL(GET_FIELD_IDX(values, DLGI_HASH_ENTRY_COL_IDX)) = 0;
+ VAL_NULL(GET_FIELD_IDX(values, DLGI_HASH_ID_COL_IDX)) = 0;
+ VAL_NULL(GET_FIELD_IDX(values, DLGI_STATE_COL_IDX)) = 0;
VAL_NULL(GET_FIELD_IDX(values, DLGI_START_TIME_COL_IDX)) = 0;
- VAL_NULL(GET_FIELD_IDX(values, DLGI_TIMEOUT_COL_IDX)) = 0;
+ VAL_NULL(GET_FIELD_IDX(values, DLGI_TIMEOUT_COL_IDX)) = 0;
+ VAL_NULL(GET_FIELD_IDX(values, DLGI_CALLER_CONTACT_COL_IDX)) = 0;
+ VAL_NULL(GET_FIELD_IDX(values, DLGI_CALLER_SOCK_IDX)) = 0;
if((dialog_dbf.insert(dialog_db_handle, insert_keys, values, DIALOG_IN_TABLE_COL_NO))
!=0){
LM_ERR("could not add another dialog_in to db\n");