Changeset 0a8eb88 for lib/format_linux.c


Ignore:
Timestamp:
11/26/12 11:53:07 (9 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:
d500159
Parents:
afaf6e8
Message:
  • Fixed bug where we were setting format data for an input trace object when starting a Linux native *output* - good spot by Richard Sanger :)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_linux.c

    rd726c7b r0a8eb88  
    287287static int linuxnative_start_output(libtrace_out_t *libtrace)
    288288{
    289         FORMAT(libtrace->format_data)->fd =
    290                                 socket(PF_PACKET, SOCK_RAW, 0);
    291         if (FORMAT(libtrace->format_data)->fd==-1) {
    292                 free(libtrace->format_data);
     289        DATAOUT(libtrace)->fd = socket(PF_PACKET, SOCK_RAW, 0);
     290        if (DATAOUT(libtrace)->fd==-1) {
     291                free(DATAOUT(libtrace));
    293292                return -1;
    294293        }
    295         FORMAT(libtrace->format_data)->stats_valid=0;
    296294
    297295        return 0;
Note: See TracChangeset for help on using the changeset viewer.