Changeset b51edf5 for lib/trace.c


Ignore:
Timestamp:
03/07/06 10:50:19 (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:
8f80e87
Parents:
e4e1635
Message:

Added RT_KEYCHANGE to rt protocol
Fixed incorrect calculation in trace_get_seconds
rt_read_packet now returns sizeof(rt_header_t) + packet length
trace_get_capture_length no longer asserts for packet->size = 0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/trace.c

    re4e1635 rb51edf5  
    11721172                /* timeval -> seconds */
    11731173                tv = packet->trace->format->get_timeval(packet);
    1174                 seconds = tv.tv_sec + ((tv.tv_usec * UINT_MAX * 1.0)/1000000);
     1174                seconds = tv.tv_sec + ((tv.tv_usec * 1.0) / 1000000);
    11751175        }
    11761176
     
    11801180size_t trace_get_capture_length(const libtrace_packet_t *packet) {
    11811181
    1182         assert(packet->size>0 && packet->size<65536);
     1182        /* Packets can be have a size of zero */
     1183        assert(packet->size>=0 && packet->size<65536);
    11831184
    11841185        if (packet->trace->format->get_capture_length) {
Note: See TracChangeset for help on using the changeset viewer.