Module: sip-router
Branch: master
Commit: a8d376e9108e1f1835a40c5da29b104adf847399
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a8d376e…
Author: Timo Reimann <timo.reimann(a)1und1.de>
Committer: Timo Reimann <timo.reimann(a)1und1.de>
Date: Fri Sep 9 13:34:10 2011 +0200
modules_k/dialog: Remove unused parameter "new" from prototype and
calls to set_dlg_variable_unsafe().
Credits to Anca Vamanu (anca.vamanu(a)1und1.ro).
---
modules_k/dialog/dlg_db_handler.c | 2 +-
modules_k/dialog/dlg_var.c | 10 +++++-----
modules_k/dialog/dlg_var.h | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/modules_k/dialog/dlg_db_handler.c b/modules_k/dialog/dlg_db_handler.c
index 6f55dcf..c0b8fbc 100644
--- a/modules_k/dialog/dlg_db_handler.c
+++ b/modules_k/dialog/dlg_db_handler.c
@@ -526,7 +526,7 @@ static int load_dialog_vars_from_db(int fetch_num_rows)
dlg = (d_table->entries)[VAL_INT(values)].first;
while (dlg) {
if (dlg->h_id == VAL_INT(values+1)) {
- set_dlg_variable_unsafe(dlg, &VAL_STR(values+2), &VAL_STR(values+3), 0);
+ set_dlg_variable_unsafe(dlg, &VAL_STR(values+2), &VAL_STR(values+3));
continue;
}
dlg = dlg->next;
diff --git a/modules_k/dialog/dlg_var.c b/modules_k/dialog/dlg_var.c
index 51ce8eb..3226bc4 100644
--- a/modules_k/dialog/dlg_var.c
+++ b/modules_k/dialog/dlg_var.c
@@ -104,7 +104,7 @@ struct dlg_var * get_local_varlist_pointer(struct sip_msg *msg, int
clear_pointe
}
/* Adds, updates and deletes dialog variables */
-int set_dlg_variable_unsafe(struct dlg_cell *dlg, str *key, str *val, int new)
+int set_dlg_variable_unsafe(struct dlg_cell *dlg, str *key, str *val)
{
struct dlg_var * var = NULL;
struct dlg_var * it;
@@ -250,12 +250,12 @@ int set_dlg_variable(struct dlg_cell *dlg, str *key, str *val)
if( !val)
{
- if (set_dlg_variable_unsafe(dlg, key, NULL, 1)!=0) {
+ if (set_dlg_variable_unsafe(dlg, key, NULL)!=0) {
LM_ERR("failed to delete dialog variable <%.*s>\n",
key->len,key->s);
goto error;
}
} else {
- if (set_dlg_variable_unsafe(dlg, key, val, 1)!=0) {
+ if (set_dlg_variable_unsafe(dlg, key, val)!=0) {
LM_ERR("failed to store dialog values
<%.*s>\n",key->len,key->s);
goto error;
}
@@ -332,7 +332,7 @@ int pv_set_dlg_variable(struct sip_msg* msg, pv_param_t *param, int
op, pv_value
if (val==NULL || val->flags&(PV_VAL_NONE|PV_VAL_NULL|PV_VAL_EMPTY)) {
/* if NULL, remove the value */
- if (set_dlg_variable_unsafe(dlg, ¶m->pvn.u.isname.name.s, NULL, 1)!=0) {
+ if (set_dlg_variable_unsafe(dlg, ¶m->pvn.u.isname.name.s, NULL)!=0) {
LM_ERR("failed to delete dialog variable <%.*s>\n",
param->pvn.u.isname.name.s.len,param->pvn.u.isname.name.s.s);
/* unlock dialog */
if (dlg) dlg_unlock(d_table, &(d_table->entries[dlg->h_entry]));
@@ -347,7 +347,7 @@ int pv_set_dlg_variable(struct sip_msg* msg, pv_param_t *param, int
op, pv_value
return -1;
}
- if (set_dlg_variable_unsafe(dlg, ¶m->pvn.u.isname.name.s, &val->rs,
1)!=0) {
+ if (set_dlg_variable_unsafe(dlg, ¶m->pvn.u.isname.name.s,
&val->rs)!=0) {
LM_ERR("failed to store dialog values
<%.*s>\n",param->pvn.u.isname.name.s.len,param->pvn.u.isname.name.s.s);
/* unlock dialog */
if (dlg) dlg_unlock(d_table, &(d_table->entries[dlg->h_entry]));
diff --git a/modules_k/dialog/dlg_var.h b/modules_k/dialog/dlg_var.h
index cd53807..03e2fd8 100644
--- a/modules_k/dialog/dlg_var.h
+++ b/modules_k/dialog/dlg_var.h
@@ -62,7 +62,7 @@ int pv_set_dlg_variable(struct sip_msg* msg, pv_param_t *param, int op,
pv_value
struct dlg_var * get_local_varlist_pointer(struct sip_msg *msg, int clear_pointer);
/* Adds, updates and deletes dialog variables */
-int set_dlg_variable_unsafe(struct dlg_cell *dlg, str *key, str *val, int new);
+int set_dlg_variable_unsafe(struct dlg_cell *dlg, str *key, str *val);
extern dlg_ctx_t _dlg_ctx;