Skip to content

Commit

Permalink
sipcapture: update to use kam_rand()
Browse files Browse the repository at this point in the history
  • Loading branch information
sjthomason committed Jul 7, 2016
1 parent f2d056c commit db69f64
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modules/sipcapture/sipcapture.c
Expand Up @@ -74,6 +74,7 @@
#include "../../resolve.h"
#include "../../receive.h"
#include "../../mod_fix.h"
#include "../../rand/kam_rand.h"
#include "sipcapture.h"
#include "hash_mode.h"
#include "hep.h"
Expand Down Expand Up @@ -807,7 +808,7 @@ static int mod_init(void)
}
#endif

srand(time(NULL));
kam_srand(time(NULL));


if(db_insert_mode) {
Expand Down Expand Up @@ -1481,7 +1482,7 @@ static int sip_capture_store(struct _sipcapture_object *sco, str *dtable, _captu
}
else if (c->mtmode == mode_random )
{
ii = rand() % c->no_tables;
ii = kam_rand() % c->no_tables;
LM_DBG("rand idx is:%d\n", ii);
}
else if (c->mtmode == mode_round_robin)
Expand Down

0 comments on commit db69f64

Please sign in to comment.