Changeset 8fa0167


Ignore:
Timestamp:
11/01/17 14:22:38 (4 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
cachetimestamps, develop, dpdk-ndag, etsilive, master, ndag_format, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance
Children:
aa7db84
Parents:
6e16301
Message:

Fix bad placement of FD_ZERO.

Also increment 'missing' by the total sequence number gap, not
1 each time the gap is non-zero.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_ndag.c

    r6e16301 r8fa0167  
    653653        availsocks = 0;
    654654
     655        FD_ZERO(&allgroups);
    655656        for (i = 0; i < rt->sourcecount; i ++) {
    656657                if (read_required(rt->sources[i])) {
     
    678679         * sockets.
    679680         */
    680         FD_ZERO(&allgroups);
    681681        if (select(maxfd + 1, &allgroups, NULL, NULL, &timeout) < 0) {
    682682                fprintf(stderr, "Error waiting to receive records: %s\n",
     
    745745                        if (ntohl(rt->sources[i].encaphdr->seqno) !=
    746746                                        rt->sources[i].expectedseq) {
    747                                 rt->missing_records += 1;
     747                                /* TODO deal with wrapping */
     748                                rt->missing_records += (ntohl(rt->sources[i].encaphdr->seqno) - rt->sources[i].expectedseq);
    748749                        }
    749750                }
Note: See TracChangeset for help on using the changeset viewer.