Skip to content

Commit

Permalink
rtpengine: rtpengine_tout is now rtpengine_tout_ms
Browse files Browse the repository at this point in the history
- rtpengine tout param is now expressed in millisecs
  • Loading branch information
lucian balanceanu committed Feb 11, 2015
1 parent b06626e commit 82192d0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions modules/rtpengine/doc/rtpengine_admin.xml
Expand Up @@ -159,21 +159,21 @@ modparam("rtpengine", "rtpengine_disable_tout", 20)
</programlisting>
</example>
</section>
<section id="rtpengine.p.rtpengine_tout">
<title><varname>rtpengine_tout</varname> (integer)</title>
<section id="rtpengine.p.rtpengine_tout_ms">
<title><varname>rtpengine_tout_ms</varname> (integer)</title>
<para>
Timeout value in waiting for reply from &rtp; proxy.
Timeout value expressed in milliseconds in waiting for reply from &rtp; proxy.
</para>
<para>
<emphasis>
Default value is <quote>1</quote>.
Default value is <quote>1000</quote>.
</emphasis>
</para>
<example>
<title>Set <varname>rtpengine_tout</varname> parameter</title>
<title>Set <varname>rtpengine_tout_ms</varname> parameter</title>
<programlisting format="linespecific">
...
modparam("rtpengine", "rtpengine_tout", 2)
modparam("rtpengine", "rtpengine_tout_ms", 2000)
...
</programlisting>
</example>
Expand Down
6 changes: 3 additions & 3 deletions modules/rtpengine/rtpengine.c
Expand Up @@ -182,7 +182,7 @@ static struct mi_root* mi_show_rtpproxies(struct mi_root* cmd_tree,

static int rtpengine_disable_tout = 60;
static int rtpengine_retr = 5;
static int rtpengine_tout = 1;
static int rtpengine_tout_ms = 1000;
static pid_t mypid;
static unsigned int myseqn = 0;
static str extra_id_pv_param = {NULL, 0};
Expand Down Expand Up @@ -279,7 +279,7 @@ static param_export_t params[] = {
(void*)rtpengine_set_store },
{"rtpengine_disable_tout",INT_PARAM, &rtpengine_disable_tout },
{"rtpengine_retr", INT_PARAM, &rtpengine_retr },
{"rtpengine_tout", INT_PARAM, &rtpengine_tout },
{"rtpengine_tout_ms", INT_PARAM, &rtpengine_tout_ms },
{"db_url", PARAM_STR, &rtpp_db_url },
{"table_name", PARAM_STR, &rtpp_table_name },
{"url_col", PARAM_STR, &rtpp_url_col },
Expand Down Expand Up @@ -1546,7 +1546,7 @@ send_rtpp_command(struct rtpp_node *node, bencode_item_t *dict, int *outlen)
LM_ERR("can't send command to a RTP proxy\n");
goto badproxy;
}
while ((poll(fds, 1, rtpengine_tout * 1000) == 1) &&
while ((poll(fds, 1, rtpengine_tout_ms) == 1) &&
(fds[0].revents & POLLIN) != 0) {
do {
len = recv(rtpp_socks[node->idx], buf, sizeof(buf)-1, 0);
Expand Down

0 comments on commit 82192d0

Please sign in to comment.