Changeset fe7b292 for lib/format_erf.c


Ignore:
Timestamp:
10/20/05 17:41:02 (16 years ago)
Author:
Shane Alcock <salcock@…>
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:
c95b923
Parents:
5496a87
Message:

Fixed issues in set_capture_length regarding the meaning of the parameters and return value

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_erf.c

    r734dfb1 rfe7b292  
    759759        dag_record_t *erfptr = 0;
    760760        assert(packet);
    761         if(size > packet->size) {
     761        if((size + sizeof(dag_record_t)) > packet->size) {
    762762                // can't make a packet larger
    763                 return packet->size;
     763                return (packet->size - sizeof(dag_record_t));
    764764        }
    765765        erfptr = (dag_record_t *)packet->buffer;
    766         erfptr->rlen = ntohs(size + sizeof(dag_record_t));
     766        erfptr->rlen = htons(size + sizeof(dag_record_t));
    767767        packet->size = size + sizeof(dag_record_t);
    768         return packet->size;
     768        return size;
    769769}
    770770
Note: See TracChangeset for help on using the changeset viewer.