Ignore:
Timestamp:
04/24/13 11:15:32 (8 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:
460855d
Parents:
1439466
Message:
  • Fixed erroneous configuration example -- you have to set the compression type to get compressed output now
File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/tutorial/configdemo.c

    r8835f5a rc73f536  
    5656
    5757        int level = 6;
     58        trace_option_compresstype_t method = TRACE_OPTION_COMPRESSTYPE_ZLIB;
    5859
    5960        /* Check that we have all the required command line arguments */
     
    121122        }
    122123
     124        /* We want to write compressed output, so tell libtrace which
     125         * compression format to use for our output trace.
     126         *
     127         * Not configuring this will result in uncompressed output,
     128         * regardless of whether a compression level is set or not. This
     129         * is different behaviour to earlier versions of libtrace where
     130         * the default was to produce a compressed file.
     131         */
     132        if (trace_config_output(output, TRACE_OPTION_OUTPUT_COMPRESSTYPE,
     133                        &method) == -1) {
     134                trace_perror_output(output, "Configuring compression method");
     135                libtrace_cleanup(trace, output, packet, filter);
     136                return 1;
     137        }
     138
    123139        /* We're also going to set a compression level option for the output
    124140         * trace to ensure that our traces are compressed sensibly.
Note: See TracChangeset for help on using the changeset viewer.