Changeset 70b38dc for lib/format_rt.c


Ignore:
Timestamp:
02/16/06 11:01:56 (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:
20b7e75
Parents:
6561682
Message:

Fixed stupid errors in rt_send_ack

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_rt.c

    r6561682 r70b38dc  
    304304        }
    305305       
    306         hdr = (rt_header_t) ack_buffer;
    307         ack_hdr = (rt_ack_t) (ack_buffer + sizeof(rt_header_t));
     306        hdr = (rt_header_t *) ack_buffer;
     307        ack_hdr = (rt_ack_t *) (ack_buffer + sizeof(rt_header_t));
    308308       
    309309        hdr->type = RT_ACK;
    310310        hdr->length = sizeof(rt_header_t) + sizeof(rt_ack_t);
    311311
    312         ack_hdr->ts = trace_get_erf_timestamp(packet);
     312        ack_hdr->timestamp = trace_get_erf_timestamp(packet);
    313313       
    314314        to_write = hdr->length;
     
    316316       
    317317        while (to_write > 0) {
    318                 numbytes = send(RT_INFO.input_fd, buf_ptr, to_write);
     318                numbytes = send(RT_INFO->input_fd, buf_ptr, to_write, 0);
    319319                if (numbytes == -1) {
    320320                        if (errno == EINTR || errno == EAGAIN) {
     
    429429                        case RT_END_DATA:
    430430                                // need to do something sensible here
    431                                
    432                                 break;
     431                                return 0;       
    433432
    434433                        case RT_PAUSE_ACK:
Note: See TracChangeset for help on using the changeset viewer.