mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-14 02:56:48 +00:00
remove srand call to get more random strings
This commit is contained in:
parent
a9c10f8c41
commit
4ba52c0827
@ -105,8 +105,6 @@ SWITCH_DECLARE(void) switch_stun_random_string(char *buf, uint16_t len, char *se
|
|||||||
|
|
||||||
max = (int) strlen(set);
|
max = (int) strlen(set);
|
||||||
|
|
||||||
srand((unsigned int) switch_micro_time_now());
|
|
||||||
|
|
||||||
for (x = 0; x < len; x++) {
|
for (x = 0; x < len; x++) {
|
||||||
int j = (int) (max * 1.0 * rand() / (RAND_MAX + 1.0));
|
int j = (int) (max * 1.0 * rand() / (RAND_MAX + 1.0));
|
||||||
buf[x] = set[j];
|
buf[x] = set[j];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user