Skip to content

Commit

Permalink
dispatcher: Fix modparam typo (ds_probing_threshhold)
Browse files Browse the repository at this point in the history
The old version is still kept for backwards-compatibility.
  • Loading branch information
liviuchircu committed Jun 12, 2019
1 parent ddfd37a commit 36a09ee
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
6 changes: 3 additions & 3 deletions modules/dispatcher/dispatch.c
Expand Up @@ -1970,14 +1970,14 @@ int ds_set_state_repl(int group, str *address, int state, int type,
idx->dlist[i].failure_count++;
/* Fire only, if the Threshold is reached. */
if (idx->dlist[i].failure_count
< probing_threshhold) {
< probing_threshold) {
lock_stop_read( partition->lock );
return 0;
}
if (idx->dlist[i].failure_count
> probing_threshhold)
> probing_threshold)
idx->dlist[i].failure_count
= probing_threshhold;
= probing_threshold;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion modules/dispatcher/dispatch.h
Expand Up @@ -183,7 +183,7 @@ extern struct fs_binds fs_api;
extern str ds_ping_method;
extern str ds_ping_from;
extern int ds_ping_maxfwd;
extern int probing_threshhold; /* number of failed requests,
extern int probing_threshold; /* number of failed requests,
before a destination is taken into probing */
extern int ds_probing_mode;

Expand Down
5 changes: 3 additions & 2 deletions modules/dispatcher/dispatcher.c
Expand Up @@ -64,7 +64,7 @@ str hash_pvar_param = {NULL, 0};
pv_elem_t * hash_param_model = NULL;


int probing_threshhold = 3; /* number of failed requests, before a destination
int probing_threshold = 3; /* number of failed requests, before a destination
is taken into probing */
str ds_ping_method = {"OPTIONS",7};
str ds_ping_from = {"sip:dispatcher@localhost", 24};
Expand Down Expand Up @@ -257,7 +257,8 @@ static param_export_t params[]={
{"hash_pvar", STR_PARAM, &hash_pvar_param.s},
{"setid_pvar", STR_PARAM, &ds_setid_pvname.s},
{"pvar_algo_pattern", STR_PARAM, &pvar_algo_param.s},
{"ds_probing_threshhold", INT_PARAM, &probing_threshhold},
{"ds_probing_threshhold", INT_PARAM, &probing_threshold},
{"ds_probing_threshold", INT_PARAM, &probing_threshold},
{"ds_ping_method", STR_PARAM, &ds_ping_method.s},
{"ds_ping_from", STR_PARAM, &ds_ping_from.s},
{"ds_ping_interval", INT_PARAM, &ds_ping_interval},
Expand Down
8 changes: 4 additions & 4 deletions modules/dispatcher/doc/dispatcher_admin.xml
Expand Up @@ -322,8 +322,8 @@ modparam("dispatcher", "ds_probing_sock", "udp:192.168.1.100:5077")
</example>
</section>

<section id="param_ds_probing_threshhold" xreflabel="ds_probing_threshhold">
<title><varname>ds_probing_threshhold</varname> (int)</title>
<section id="param_ds_probing_threshold" xreflabel="ds_probing_threshold">
<title><varname>ds_probing_threshold</varname> (int)</title>
<para>
If you want to set a gateway into probing mode, you will need a
specific number of requests until it will change from "active" to
Expand All @@ -335,10 +335,10 @@ modparam("dispatcher", "ds_probing_sock", "udp:192.168.1.100:5077")
</emphasis>
</para>
<example>
<title>Set the <quote>ds_probing_threshhold</quote> parameter</title>
<title>Set the <quote>ds_probing_threshold</quote> parameter</title>
<programlisting format="linespecific">
...
modparam("dispatcher", "ds_probing_threshhold", 10)
modparam("dispatcher", "ds_probing_threshold", 10)
...
</programlisting>
</example>
Expand Down

0 comments on commit 36a09ee

Please sign in to comment.