use time in usec for rand seed

removed extra call to srand in sesue process
master
Joseph Giovatto 6 years ago committed by Andre Puschmann
parent 4a0ebe0cca
commit 69e9066c76

@ -170,8 +170,13 @@ void rrc::init(phy_interface_rrc_lte* phy_,
set_mac_default(); set_mac_default();
measurements.init(this); measurements.init(this);
// set seed for rand (used in attach)
srand(time(NULL)); struct timeval tv;
gettimeofday(&tv, NULL);
rrc_log->info("using srand seed of %ld\n", tv.tv_usec);
// set seed (used in CHAP auth and attach)
srand(tv.tv_usec);
running = true; running = true;
start(); start();

@ -119,9 +119,6 @@ void nas::init(usim_interface_nas* usim_, rrc_interface_nas* rrc_, gw_interface_
have_ctxt = true; have_ctxt = true;
} }
// set seed for rand (used in CHAP auth)
srand(time(NULL));
running = true; running = true;
} }

Loading…
Cancel
Save