Skip to content

Commit

Permalink
Remove various deprecated parameters
Browse files Browse the repository at this point in the history
    * no longer accept deprecated flag modparams with integer values
    * tm: remove deprecated "fr_timer" and "fr_inv_timer" modparams

(cherry picked from commit 382f6e3)
  • Loading branch information
liviuchircu committed May 29, 2019
1 parent 023eb2d commit 9ca1e9c
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 65 deletions.
1 change: 0 additions & 1 deletion modules/call_control/call_control.c
Expand Up @@ -175,7 +175,6 @@ static param_export_t parameters[] = {
{"call_limit_avp", STR_PARAM, &(call_limit_avp.spec.s)},
{"call_token_avp", STR_PARAM, &(call_token_avp.spec.s)},
{"prepaid_account_flag", STR_PARAM, &prepaid_account_str},
{"prepaid_account_flag", INT_PARAM, &prepaid_account_flag},
{0, 0, 0}
};

Expand Down
9 changes: 2 additions & 7 deletions modules/call_control/doc/call_control_admin.xml
Expand Up @@ -371,7 +371,7 @@ route {
</section>

<section id="param_prepaid_account_flag" xreflabel="prepaid_account_flag">
<title><varname>prepaid_account_flag</varname> (string/integer)</title>
<title><varname>prepaid_account_flag</varname> (string)</title>
<para>
The flag that is used to specify whether the account making the call is
prepaid or postpaid. Setting this to a non-null value will determine
Expand All @@ -383,14 +383,9 @@ route {
one.
</para>

<para>
<emphasis>WARNING: </emphasis>Setting INT flags is deprecated!
Use quoted strings instead!
</para>

<para>
<emphasis>
Default value is <quote>NULL</quote> (undefined).
Default value is NULL (undefined).
</emphasis>
</para>

Expand Down
20 changes: 6 additions & 14 deletions modules/nathelper/doc/nathelper_admin.xml
Expand Up @@ -268,19 +268,15 @@ modparam("nathelper", "force_socket", "localhost:33333")
</section>

<section id="param_sipping_bflag" xreflabel="sipping_bflag">
<title><varname>sipping_bflag</varname> (string/integer)</title>
<title><varname>sipping_bflag</varname> (string)</title>
<para>
What branch flag should be used by the module to identify NATed
contacts for which it should perform NAT ping via a SIP request
instead if dummy UDP package.
</para>
<para>
<emphasis>WARNING: </emphasis>Setting INT flags is deprecated!
Use quoted strings instead!
</para>
<para>
<emphasis>
Default value is "NULL" (disabled).
Default value is NULL (disabled).
</emphasis>
</para>
<example>
Expand All @@ -294,18 +290,14 @@ modparam("nathelper", "sipping_bflag", "SIPPING_ENABLE")
</section>

<section id="param_remove_on_timeout_bflag" xreflabel="remove_on_timeout_bflag">
<title><varname>remove_on_timeout_bflag</varname> (string/integer)</title>
<title><varname>remove_on_timeout_bflag</varname> (string)</title>
<para>
What branch flag to be used in order to activate usrloc contact removal when
the <xref linkend="param_ping_threshold"/> is exceeded.
</para>
<para>
<emphasis>WARNING: </emphasis>Setting INT flags is deprecated!
Use quoted strings instead!
</para>
<para>
<emphasis>
Default value is "NULL" (disabled).
Default value is NULL (disabled).
</emphasis>
</para>
<example>
Expand All @@ -319,15 +311,15 @@ modparam("nathelper", "remove_on_timeout_bflag", "SIPPING_RTO")
</section>

<section id="param_sipping_latency_flag" xreflabel="sipping_latency_flag">
<title><varname>sipping_latency_flag</varname> (string/integer)</title>
<title><varname>sipping_latency_flag</varname> (string)</title>
<para>
The branch flag which will be used in order to enable contact pinging
latency computation and reporting via the usrloc E_UL_LATENCY_UPDATE
event.
</para>
<para>
<emphasis>
Default value is "NULL" (disabled).
Default value is NULL (disabled).
</emphasis>
</para>
<example>
Expand Down
3 changes: 0 additions & 3 deletions modules/nathelper/nathelper.c
Expand Up @@ -256,11 +256,8 @@ static param_export_t params[] = {
{"sipping_from", STR_PARAM, &sipping_from.s },
{"sipping_method", STR_PARAM, &sipping_method.s },
{"sipping_bflag", STR_PARAM, &sipping_flag_str },
{"sipping_bflag", INT_PARAM, &sipping_flag },
{"sipping_latency_flag", STR_PARAM, &sipping_latency_flag_str},
{"sipping_latency_flag", INT_PARAM, &sipping_latency_flag },
{"remove_on_timeout_bflag", STR_PARAM, &rm_on_to_flag_str },
{"remove_on_timeout_bflag", INT_PARAM, &rm_on_to_flag },
{"natping_tcp", INT_PARAM, &natping_tcp },
{"natping_partitions", INT_PARAM, &natping_partitions },
{"natping_socket", STR_PARAM, &natping_socket },
Expand Down
5 changes: 1 addition & 4 deletions modules/sst/doc/sst_admin.xml
Expand Up @@ -242,7 +242,7 @@ modparam("sst", "reject_to_small", 0)
</example>
</section>
<section id="param_sst_flag" xreflabel="sst_flag">
<title><varname>sst_flag</varname> (string/integer)</title>
<title><varname>sst_flag</varname> (string)</title>

<para>Keeping with OpenSIPS, the module will not do
anything to any message unless instructed to do so via
Expand All @@ -260,9 +260,6 @@ modparam("sst", "reject_to_small", 0)
<para>This parameter must be set of the module will
not load.</para>

<para><emphasis>WARNING: </emphasis>Setting INT flags is deprecated!
Use quoted strings instead!</para>

<para>
<emphasis>
Default value is <quote>Not set!</quote>.
Expand Down
2 changes: 0 additions & 2 deletions modules/sst/sst.c
Expand Up @@ -100,7 +100,6 @@ static param_export_t mod_params[]={
{ "min_se", INT_PARAM, &sst_minSE },
{ "reject_to_small", INT_PARAM, &sst_reject },
{ "sst_flag", STR_PARAM, &sst_flag_str },
{ "sst_flag", INT_PARAM, &sst_flag },
{ "sst_interval", INT_PARAM, &sst_interval },
{ 0,0,0 }
};
Expand Down Expand Up @@ -172,7 +171,6 @@ static int mod_init(void)
}

fix_flag_name(sst_flag_str, sst_flag);

sst_flag = get_flag_id_by_name(FLAG_TYPE_MSG, sst_flag_str);

if (sst_flag == -1) {
Expand Down
29 changes: 1 addition & 28 deletions modules/tm/tm.c
Expand Up @@ -88,10 +88,6 @@ static int pv_get_tm_ruri(struct sip_msg *msg, pv_param_t *param,
static int pv_get_t_id(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);

/* TODO: remove in future versions (deprecated parameters) */
int __set_fr_timer(modparam_t type, void* val);
int __set_fr_inv_timer(modparam_t type, void* val);

/* fixup functions */
static int fixup_local_replied(void** param);
static int fixup_cancel_branch(void** param);
Expand Down Expand Up @@ -277,10 +273,6 @@ static param_export_t params[]={
&(timer_id2timeout[FR_TIMER_LIST])},
{"fr_inv_timeout", INT_PARAM,
&(timer_id2timeout[FR_INV_TIMER_LIST])},
{"fr_timer", INT_PARAM|USE_FUNC_PARAM,
__set_fr_timer},
{"fr_inv_timer", INT_PARAM|USE_FUNC_PARAM,
__set_fr_inv_timer},
{"wt_timer", INT_PARAM,
&(timer_id2timeout[WT_TIMER_LIST])},
{"delete_timer", INT_PARAM,
Expand Down Expand Up @@ -2004,7 +1996,7 @@ int pv_set_tm_fr_timeout(struct sip_msg *msg, pv_param_t *param, int op,
if (!msg)
return -1;

/* "$T_fr_timer = NULL" will set the default timeout */
/* "$T_fr_timeout = NULL" will set the default timeout */
if (!val) {
timeout = timer_id2timeout[FR_TIMER_LIST];
goto set_timeout;
Expand Down Expand Up @@ -2075,25 +2067,6 @@ int pv_set_tm_fr_inv_timeout(struct sip_msg *msg, pv_param_t *param,
return 0;
}

int __set_fr_timer(modparam_t type, void* val)
{
LM_WARN("\"fr_timer\" is now deprecated! Use \"fr_timeout\" instead!\n");

timer_id2timeout[FR_TIMER_LIST] = (int)(long)val;

return 1;
}

int __set_fr_inv_timer(modparam_t type, void* val)
{
LM_WARN("\"fr_inv_timer\" is now deprecated! Use \"fr_inv_timeout\" instead!\n");

timer_id2timeout[FR_INV_TIMER_LIST] = (int)(long)val;

return 1;
}


static int pv_get_t_id(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res)
{
Expand Down
8 changes: 3 additions & 5 deletions modules/usrloc/doc/usrloc_admin.xml
Expand Up @@ -257,17 +257,15 @@
<section id="exported_parameters" xreflabel="Exported Parameters">
<title>Exported Parameters</title>
<section id="param_nat_bflag" xreflabel="nat_bflag">
<title><varname>nat_bflag</varname> (string/integer)</title>
<title><varname>nat_bflag</varname> (string)</title>
<para>
The name of the branch flag to be used as NAT marker (if the contact
is or not natted). This is a branch flag and it will be imported and
used by all other modules depending of usrloc module.
used by all other modules depending on the usrloc module.
</para>
<para>
<emphasis>WARNING: </emphasis>Setting INT flags is deprecated!
Use quoted strings instead!
<emphasis>
Default value is <quote>NULL</quote> (not set).
Default value is NULL (not set).
</emphasis>
</para>
<example>
Expand Down
1 change: 0 additions & 1 deletion modules/usrloc/ul_mod.c
Expand Up @@ -237,7 +237,6 @@ static param_export_t params[] = {
{"cseq_delay", INT_PARAM, &cseq_delay },
{"hash_size", INT_PARAM, &ul_hash_size },
{"nat_bflag", STR_PARAM, &nat_bflag_str },
{"nat_bflag", INT_PARAM, &nat_bflag },
/* data replication through clusterer using TCP binary packets */
{ "location_cluster", INT_PARAM, &location_cluster },
{ "skip_replicated_db_ops", INT_PARAM, &skip_replicated_db_ops },
Expand Down

0 comments on commit 9ca1e9c

Please sign in to comment.