Changeset 671566a for lib/format_rt.c


Ignore:
Timestamp:
04/20/06 23:40:59 (16 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:
edb18ce
Parents:
566e404
Message:
  • Add some casts to keep windows happy (windows thinks send/recv take char*!

humph!)

  • Remove some unused variables
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_rt.c

    r4617920 r671566a  
    145145        /* We are connected, now receive message from server */
    146146       
    147         if (recv(RT_INFO->input_fd, &connect_msg, sizeof(rt_header_t), 0) != sizeof(rt_header_t) ) {
     147        if (recv(RT_INFO->input_fd, (void*)&connect_msg, sizeof(rt_header_t), 0) != sizeof(rt_header_t) ) {
    148148                trace_set_err(libtrace, TRACE_ERR_INIT_FAILED,
    149149                                "Could not receive connection message from %s",
     
    155155                case RT_DENY_CONN:
    156156                       
    157                         if (recv(RT_INFO->input_fd, &deny_hdr,
     157                        if (recv(RT_INFO->input_fd, (void*)&deny_hdr,
    158158                                                sizeof(rt_deny_conn_t),
    159159                                                0) != sizeof(rt_deny_conn_t)) {
     
    167167                case RT_HELLO:
    168168                        /* do something with options */
    169                         if (recv(RT_INFO->input_fd, &hello_opts,
     169                        if (recv(RT_INFO->input_fd, (void*)&hello_opts,
    170170                                                sizeof(rt_hello_t), 0)
    171171                                        != sizeof(rt_hello_t)) {
     
    232232       
    233233        /* Need to send start message to server */
    234         if (send(RT_INFO->input_fd, &start_msg, sizeof(rt_header_t) +
     234        if (send(RT_INFO->input_fd, (void*)&start_msg, sizeof(rt_header_t) +
    235235                                start_msg.length, 0) != sizeof(rt_header_t)) {
    236236                printf("Failed to send start message to server\n");
     
    248248       
    249249        /* Send a close message to the server */
    250         if (send(RT_INFO->input_fd, &close_msg, sizeof(rt_header_t) +
     250        if (send(RT_INFO->input_fd, (void*)&close_msg, sizeof(rt_header_t) +
    251251                                close_msg.length, 0) != sizeof(rt_header_t)
    252252                                + close_msg.length) {
     
    271271static int rt_read(struct libtrace_t *libtrace, void **buffer, size_t len, int block) {
    272272        int numbytes;
    273         char *buf_ptr;
    274273
    275274        assert(len <= RT_BUF_SIZE);
     
    582581        struct libtrace_eventobj_t event = {0,0,0.0,0};
    583582        libtrace_err_t read_err;
    584         int data;
    585583
    586584        assert(trace);
Note: See TracChangeset for help on using the changeset viewer.