Changeset f0cb0d4


Ignore:
Timestamp:
11/03/15 15:44:24 (6 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
733c8b4
Parents:
21c0d70
Message:

Seed the RNG when calling trace_init

If we don't do this, we can't have more than one ring/int parallel input
at a time on a host. This is because the fanout group id is chosen using
rand() and so was previously always the same value, leading to conflicts
that would cause trace_pstart() to fail.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/trace.c

    r92a2bf6 rf0cb0d4  
    136136static void trace_init(void)
    137137{
     138        struct timeval tv;
     139        gettimeofday(&tv, NULL);
     140        srand(tv.tv_sec);
     141
    138142        if (!formats_list) {
    139143                duck_constructor();
Note: See TracChangeset for help on using the changeset viewer.