Module: kamailio Branch: 5.3 Commit: 93ad3b9ed017f00984ef241a90186b4dfdab2728 URL: https://github.com/kamailio/kamailio/commit/93ad3b9ed017f00984ef241a90186b4d...
Author: Henning Westerholt hw@skalatan.de Committer: Henning Westerholt hw@skalatan.de Date: 2020-11-27T18:01:50Z
Revert "rtpengine: add CRC32 hash algo (#2558)"
This reverts commit 0bff74a16bb991ffe8c6690133414c5c9126bd1f.
---
Modified: src/modules/rtpengine/doc/rtpengine_admin.xml Modified: src/modules/rtpengine/rtpengine.c Modified: src/modules/rtpengine/rtpengine.h
---
Diff: https://github.com/kamailio/kamailio/commit/93ad3b9ed017f00984ef241a90186b4d... Patch: https://github.com/kamailio/kamailio/commit/93ad3b9ed017f00984ef241a90186b4d...
---
diff --git a/src/modules/rtpengine/doc/rtpengine_admin.xml b/src/modules/rtpengine/doc/rtpengine_admin.xml index 6c4c932b99..cafd6b6ef4 100644 --- a/src/modules/rtpengine/doc/rtpengine_admin.xml +++ b/src/modules/rtpengine/doc/rtpengine_admin.xml @@ -2012,14 +2012,13 @@ 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> @@ -2027,9 +2026,6 @@ modparam("rtpengine", "control_cmd_tos", 144) ... ### use SHA1 instead of legacy algorithm modparam("rtpengine", "hash_algo", 1) - -### use CRC32 instead of legacy algorithm -modparam("rtpengine", "hash_algo", 2) ... </programlisting> </example> diff --git a/src/modules/rtpengine/rtpengine.c b/src/modules/rtpengine/rtpengine.c index 3044fe4b07..8b72e5b675 100644 --- a/src/modules/rtpengine/rtpengine.c +++ b/src/modules/rtpengine/rtpengine.c @@ -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; @@ -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); diff --git a/src/modules/rtpengine/rtpengine.h b/src/modules/rtpengine/rtpengine.h index bea421ee9d..8a29210db2 100644 --- a/src/modules/rtpengine/rtpengine.h +++ b/src/modules/rtpengine/rtpengine.h @@ -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