Increase rand seed granularity

This commit is contained in:
emanuel 2022-11-21 11:46:32 +00:00
parent 5f0a5370df
commit 17be2bbd29
2 changed files with 5 additions and 3 deletions

View File

@ -8,6 +8,7 @@
#include <sys/stat.h>
#include <it2s-config.h>
#include <dirent.h>
#include <sys/time.h>
#include <camv2/ProtectedCommunicationZone.h>
#include <tpm/TollingPaymentInfo.h>
#include <zmq.h>
@ -70,6 +71,10 @@ int facilities_config() {
itss_0init(&facilities.exit);
struct timeval time;
gettimeofday(&time,NULL);
srand((time.tv_sec * 1000) + (time.tv_usec / 1000));
facilities.zmq.responders = calloc(config->facilities.zmq.addresses_len + 1, sizeof(zmq_pollitem_t));
facilities.zmq.n_responders = 1;

View File

@ -817,9 +817,6 @@ int main() {
bulletin_init();
void* security_socket = NULL;
time_t t;
srand((unsigned) time(&t));
if (facilities_config()) {
goto cleanup;
}