Changeset c6f41d8


Ignore:
Timestamp:
04/19/10 13:39:23 (11 years ago)
Author:
Perry Lorier <perry@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, 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:
9299190
Parents:
a17c329
Message:

Correctly update peek buffer offsets

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/ior-peek.c

    r14509f0 rc6f41d8  
    6161        io_t *child;
    6262        char *buffer;
    63         int length;
    64         int offset;
     63        int length; /* Length of buffer */
     64        int offset; /* Offset into buffer */
    6565};
    6666
     
    110110                assert(DATA(io)->length-DATA(io)->offset == 0);
    111111                off_t bytes_read;
     112                /* If they're reading a block size, use that */
    112113                if (len % MIN_READ_SIZE  == 0) {
    113114                        bytes_read = DATA(io)->child->source->read(
     
    149150                        len = len < bytes_read ? len : bytes_read;
    150151                        memcpy(buffer, DATA(io)->buffer, len);
     152                        DATA(io)->offset = len;
    151153                        bytes_read = len;
    152154                }
Note: See TracChangeset for help on using the changeset viewer.