Use standard RNG
The custom random number generator can now be replaced with a C++11 RNG. This greatly improves the reliability and trustworthiness of it. In addition to this, the conversion of the RNG to a thread-local object removes the race condition that was present in the previous implementation. It also theoretically improves performance by a tiny bit.
This commit is contained in:
@ -48,7 +48,7 @@
|
||||
#include <maxscale/limits.h>
|
||||
#include <maxscale/pcre2.h>
|
||||
#include <maxscale/poll.h>
|
||||
#include <maxscale/random_jkiss.h>
|
||||
#include <maxscale/random.h>
|
||||
#include <maxscale/secrets.h>
|
||||
#include <maxscale/session.h>
|
||||
|
||||
@ -161,7 +161,7 @@ char *gw_strend(register const char *s)
|
||||
*****************************************/
|
||||
static char gw_randomchar()
|
||||
{
|
||||
return (char)((random_jkiss() % 78) + 30);
|
||||
return (char)((mxs_random() % 78) + 30);
|
||||
}
|
||||
|
||||
/*****************************************
|
||||
|
Reference in New Issue
Block a user