mirror of https://github.com/PentHertz/srsLTE.git
use time in usec for rand seed
removed extra call to srand in sesue process
This commit is contained in:
parent
4a0ebe0cca
commit
69e9066c76
|
@ -170,8 +170,13 @@ void rrc::init(phy_interface_rrc_lte* phy_,
|
|||
set_mac_default();
|
||||
|
||||
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;
|
||||
start();
|
||||
|
|
|
@ -119,9 +119,6 @@ void nas::init(usim_interface_nas* usim_, rrc_interface_nas* rrc_, gw_interface_
|
|||
have_ctxt = true;
|
||||
}
|
||||
|
||||
// set seed for rand (used in CHAP auth)
|
||||
srand(time(NULL));
|
||||
|
||||
running = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue