Branch: refs/heads/3.2 Home: https://github.com/OpenSIPS/opensips Commit: bf4c8a9426a6211993acf342136a87bc0847c890 https://github.com/OpenSIPS/opensips/commit/bf4c8a9426a6211993acf342136a87bc0847c890 Author: nexbridge <13848887+nexbri...@users.noreply.github.com> Date: 2023-03-16 (Thu, 16 Mar 2023)
Changed paths: M modules/drouting/drouting.c Log Message: ----------- Update drouting.c In weight_based_sort() function: - Changed RAND_MAX to RAND_MAX + 1 to make sure that quotient is always less than 1 - Changed float to double to avoid rounding errors, particularly when the value of rand() nears RAND_MAX and thus the quotient could round to 1 (cherry picked from commit 6ef8168a8de88d04512b3aa6bb888ac3794fb142) _______________________________________________ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel