Changeset 83a1f4e for lib/iow-stdio.c


Ignore:
Timestamp:
04/23/10 11:37:27 (12 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:
a89e2fa
Parents:
ba91618
Message:

Write out correct chunk sizes to avoid assert failures

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/iow-stdio.c

    rbaef9df r83a1f4e  
    128128                int err;
    129129                struct iovec iov[2];
    130                 int total = towrite - (DATA(iow)->offset+towrite) % MIN_WRITE_SIZE;
    131                 int amount = total;
     130                int total = (DATA(iow)->offset+towrite);
     131                int amount;
    132132                int count=0;
     133                /* Round down to the nearest multiple */
     134                total = total - (total % MIN_WRITE_SIZE);
     135                amount = total;
    133136                if (DATA(iow)->offset) {
    134137                        iov[count].iov_base = DATA(iow)->buffer;
     
    149152                if (err==-1)
    150153                        return -1;
    151                 if (err != total)
    152                         fprintf(stderr,"Wrote %d/%d\n",err,total);
    153154
    154155                /* Drop off "err" bytes from the beginning of the buffers */
Note: See TracChangeset for help on using the changeset viewer.