Skip to content

Commit

Permalink
Revert "rtpengine: add CRC32 hash algo (#2558)"
Browse files Browse the repository at this point in the history
This reverts commit 0bff74a.
  • Loading branch information
henningw committed Nov 27, 2020
1 parent 19ac825 commit 93ad3b9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
8 changes: 2 additions & 6 deletions src/modules/rtpengine/doc/rtpengine_admin.xml
Expand Up @@ -2012,24 +2012,20 @@ modparam("rtpengine", "control_cmd_tos", 144)
<title><varname>hash_algo</varname> (integer)</title>
<para>
Hashing algorithm to be used in node selection algorithm. Now there are 2 possibilities: legacy
algorithm - 0(very basic hash over callid), SHA1 - 1(apply sha1 over the callid and calculate hash) or
CRC32 - 2(calculate crc32 sum over the callid).
alogrithm - 0(very basic hash over callid) or SHA1 - 1(apply sha1 over the callid and calculate hash).
</para>
<para>
Default value is 0, legacy algorithm.
</para>
<para>
The values not falling into the range <quote>0-2</quote> are ignored.
The values not falling into the range <quote>0-1</quote> .
</para>
<example>
<title>Set <varname>control_cmd_tos</varname> parameter</title>
<programlisting format="linespecific">
...
### use SHA1 instead of legacy algorithm
modparam("rtpengine", "hash_algo", 1)

### use CRC32 instead of legacy algorithm
modparam("rtpengine", "hash_algo", 2)
...
</programlisting>
</example>
Expand Down
4 changes: 0 additions & 4 deletions src/modules/rtpengine/rtpengine.c
Expand Up @@ -2943,9 +2943,6 @@ select_rtpp_node_new(str callid, str viabranch, int do_test, struct rtpp_node **
}

break;
case RTP_HASH_CRC32_CALLID:
crc32_uint(&callid, &sum);
goto retry;
default:
LM_ERR("unknown hashing algo %d\n", hash_algo);
return NULL;
Expand All @@ -2963,7 +2960,6 @@ select_rtpp_node_new(str callid, str viabranch, int do_test, struct rtpp_node **
}

retry:
LM_DBG("sum is = %u\n", sum);
weight_sum = 0;

lock_get(active_rtpp_set->rset_lock);
Expand Down
2 changes: 1 addition & 1 deletion src/modules/rtpengine/rtpengine.h
Expand Up @@ -102,6 +102,6 @@ extern str rtpp_url_col;
extern str rtpp_weight_col;
extern str rtpp_disabled_col;

enum hash_algo_t { RTP_HASH_CALLID, RTP_HASH_SHA1_CALLID, RTP_HASH_CRC32_CALLID };
enum hash_algo_t { RTP_HASH_CALLID, RTP_HASH_SHA1_CALLID};

#endif

0 comments on commit 93ad3b9

Please sign in to comment.