mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-16 16:58:35 +00:00
FS-4128
This commit is contained in:
parent
7427fb9686
commit
773a4c1f84
@ -94,14 +94,10 @@ struct local_stream_source {
|
|||||||
|
|
||||||
typedef struct local_stream_source local_stream_source_t;
|
typedef struct local_stream_source local_stream_source_t;
|
||||||
|
|
||||||
static unsigned int S = 0;
|
|
||||||
|
|
||||||
static int do_rand(void)
|
static int do_rand(void)
|
||||||
{
|
{
|
||||||
double r;
|
double r;
|
||||||
int index;
|
int index;
|
||||||
unsigned int seed = ++S + getpid();
|
|
||||||
srand(seed);
|
|
||||||
r = ((double) rand() / ((double) (RAND_MAX) + (double) (1)));
|
r = ((double) rand() / ((double) (RAND_MAX) + (double) (1)));
|
||||||
index = (int) (r * 9) + 1;
|
index = (int) (r * 9) + 1;
|
||||||
return index;
|
return index;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user